You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
416 B

4 years ago
  1. 'use strict';
  2. var ES = require('es-abstract/es7');
  3. var has = require('has');
  4. var bind = require('function-bind');
  5. var isEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable);
  6. module.exports = function values(O) {
  7. var obj = ES.RequireObjectCoercible(O);
  8. var vals = [];
  9. for (var key in obj) {
  10. if (has(obj, key) && isEnumerable(obj, key)) {
  11. vals.push(obj[key]);
  12. }
  13. }
  14. return vals;
  15. };