traverjs

0.0.7 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i traverjs

Weekly Downloads

12

Version

0.0.7

License

GPL-2.0

Last publish

Collaborators

  • mbusenitz