Retrieve the values of an enumerable object.
Use this node module when you need to retrieve values from an enumerable object - obj-values
outputs an array,
has an optional reverse param.
Install with npm
npm i obj-values --save-dev
Simply require the obj-values
module. The export function can be used in any module you desire:
const objValues = require('obj-values');
var myObj = {
a: 10,
b: 200,
c: 3000,
d: "fourty thousand"
};
objValues(myObj);
//==> [10, 200, 3000, 'fourty thousand']
objValues(myObj, {reverse: true});
//==> ['fourty thousand', 3000, 200, 10]
objValues({foo: "bar", baz: "quux", fooBar: "norf"});
//==> ['bar', 'quux', 'norf']
This module uses gulp for eslint, mocha, and code coverage tools.
Run gulp init
#objValues
✓ should return an array
✓ expect result to be ok
✓ expect result to be at least 3
✓ should return the appropriate members
✓ last property should be a three
✓ last property should be a three, a string
✓ should return the appropriate members in reverse order
##Contributing
Feel free to file an issue or bugs