JSPM

deep-pick

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q70898F

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

Package Exports

  • deep-pick

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (deep-pick) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.