Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

deep-pick

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-pick

Like lo-dash/underscore `.pick()` but recursively merges and picks deeply nested occurences of a property.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

deep-pick NPM version

Like lo-dash/underscore .pick() but recursively merges and picks deeply nested occurences of a property.

Install

Install with npm

npm i deep-pick --save

Run tests

npm test

Usage

var deepPick = require('deep-pick');
var obj = {foo: {a: 'a'}, bar: {foo: {b: 'b'}}, baz: 'baz'};

deepPick(obj, 'foo');
//=> {foo: {a: 'a', b: 'b'}}

options.value

Pass value: true to return only the value for the specified property:

var obj = {foo: {a: 'a'}, bar: {foo: {b: 'b'}}, baz: 'baz'};

deepPick(obj, 'foo', {value: true});
//=> {a: 'a', b: 'b'}

Author

Jon Schlinkert

Other javascript/node.js utils

Other projects that I maintain:

License

Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license

This file was generated by verb-cli on September 22, 2014.

Keywords

deep

FAQs

Package last updated on 22 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts