traverjs
v0.0.7
Published
synchronous traversal
Downloads
52
Readme
array example:
traverjs( ['hello', 'whale' ], (element, next) => {
console.log( element );
next();
})
.then( () => {
console.log( 'done' );
});
=>
hello
whale
done
object example:
traverjs( { "hello": "whale" }, (element, next) => {
console.log( element );
next();
})
.then( () => {
console.log( 'done' );
});
=>
{ hello: 'whale' }
done