tree-values
v1.0.0
Published
Shake the values out a tree object
Downloads
6
Maintainers
Readme
tree-values
Get the values of an object, recursively.
Install
$ npm install --save tree-values
Usage
const values = require('tree-values');
values({foo: 0, bar: 1});
//=> [0, 1]
Recursive example:
var nestedObj = {
a: 'foo',
b: {x: 1, y: 2}
}
values(nestedObj);
//=> ['foo', 1, 2]
Tests
npm install
npm test
Dependencies
None
Dev Dependencies
- mocha: simple, flexible, fun test framework
License
MIT