Retrieve the values of an enumerable object
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.editorconfig
.eslintrc.json
.gitattributes
.gitignore
LICENSE
README.md
app.js
gulpfile.js
index.js
package.json

README.md

obj-values

Retrieve the values of an enumerable object.

##Overview

Use this node module when you need to retrieve values from an enumerable object - obj-values outputs an array, has an optional reverse param.

##Installing Install with npm

npm i obj-values --save-dev

##Usage

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']

##TODO

  • commit tests

##Tests

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

##Related Modules

##Contributing

Feel free to file an issue or bugs