No Description

values.js 308B

1234567891011121314
  1. var keys = require('./keys.js');
  2. // Retrieve the values of an object's properties.
  3. function values(obj) {
  4. var _keys = keys(obj);
  5. var length = _keys.length;
  6. var values = Array(length);
  7. for (var i = 0; i < length; i++) {
  8. values[i] = obj[_keys[i]];
  9. }
  10. return values;
  11. }
  12. module.exports = values;