@jswork/next-deep-each
v1.0.4
Published
Deep each for next.
Downloads
443
Readme
next-deep-each
Deep each for next.
installation
npm install -S @jswork/next-deep-each
usage
import '@jswork/next-deep-each';
const obj = {
name: 'deep-each',
items: [
{
name: 'each',
type: 'any'
},
{
name: 'forEach',
type: 'array'
},
{
name: 'forIn',
type: 'object'
}
],
other: {
a: {
b: 1,
c: {
d: 2,
e: 4,
g: {
g1: 1,
g2: 123
}
}
}
}
};
// main
nx.deepEach(obj, (key, value, target, isAry, paths) => {
console.log(key,value);
});
license
Code released under the MIT license.