implementation.js 416 B

123456789101112131415161718
  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. };