npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

deep-pluck-ref

1.2.0 • Public • Published

Deep Pluck Ref

Contextual Deep Pluck

Deep pluck ref finds the desired properties and plucks the parent object reference.

Installation

$ npm install deep-pluck-ref

Usage

import deepPluckRef from 'deep-pluck-ref';
 
const obj = {
    do: {
        all: {
            the: {
                things: [
                    {
                        thing: 'one',
                        value: 'thing one value'
                    },
                    {
                        thing: 'two',
                        value: 'thing two value'
                    },
                    {
                        thing: 'three'
                    }
                ]
            }
        }
    }
};
const results = deepPluckRef(obj, ['value']);
// [ { thing: 'one', value: 'thing one value' }, 
// { { thing: 'two', value: 'thing two value' } ]
 

install

npm i deep-pluck-ref

Downloadsweekly downloads

6

version

1.2.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability