esnext.object.iterate-keys.js 387 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.iterateKeys` method
  6. // https://github.com/tc39/proposal-object-iteration
  7. $({ target: 'Object', stat: true, forced: true }, {
  8. iterateKeys: function iterateKeys(object) {
  9. return new ObjectIterator(object, 'keys');
  10. }
  11. });