implementation.js 455 B

12345678910111213141516
  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 entries(O) {
  6. var obj = RequireObjectCoercible(O);
  7. var entrys = [];
  8. for (var key in obj) {
  9. if ($isEnumerable(obj, key)) { // checks own-ness as well
  10. entrys.push([key, obj[key]]);
  11. }
  12. }
  13. return entrys;
  14. };