implementation.js 442 B

1234567891011121314151617
  1. 'use strict';
  2. var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
  3. var callBound = require('call-bind/callBound');
  4. var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
  5. module.exports = function values(O) {
  6. var obj = RequireObjectCoercible(O);
  7. var vals = [];
  8. for (var key in obj) {
  9. if ($isEnumerable(obj, key)) { // checks own-ness as well
  10. vals.push(obj[key]);
  11. }
  12. }
  13. return vals;
  14. };