implementation.js 504 B

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