@jswork/next-pick
v1.0.0
Published
Creates an object composed of the picked object properties.
Downloads
4
Readme
next-pick
Creates an object composed of the picked object properties.
installation
npm install -S @jswork/next-pick
usage
import '@jswork/next-pick';
const object = {
'a': 1,
'c': 'c-value',
some: {
what: {
and: {
deep: {
one: 1
}
}
}
}
};
const picked = nx.pick(object, ['a', 'c', 'some.what.and.deep.one']);
// {
// "a": 1,
// "c": "c-value",
// "some": {
// "what": {
// "and": {
// "deep": {
// "one": 1
// }
// }
// }
// }
// }
license
Code released under the MIT license.