esnext.object.iterate-entries.js 399 B

123456789101112
  1. 'use strict';
  2. // TODO: Remove from `core-js@4`
  3. var $ = require('../internals/export');
  4. var ObjectIterator = require('../internals/object-iterator');
  5. // `Object.iterateEntries` method
  6. // https://github.com/tc39/proposal-object-iteration
  7. $({ target: 'Object', stat: true, forced: true }, {
  8. iterateEntries: function iterateEntries(object) {
  9. return new ObjectIterator(object, 'entries');
  10. }
  11. });