@jswork/next-get2get
v1.0.8
Published
Get paths one by one.
Downloads
89
Readme
next-get2get
Get paths one by one.
installation
npm install -S @jswork/next-get2get
usage
import '@jswork/next-get2get';
const e1 = { target: { value: '121' } };
const e2 = { detail: { value: '122' } };
const e3 = 123;
const paths = ['target.value', 'detail.value'];
const res1 = nx.get2get(e1, paths, 'event-value');
const res2 = nx.get2get(e2, paths, 'event-value');
const res3 = nx.get2get(e3, paths, 'event-value');
// '121'
// '122'
// 'event-value'
license
Code released under the MIT license.