values.js 329 B

12345678910111213141516
  1. define(['./keys'], function (keys) {
  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. return values;
  13. });