You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
463 B
15 lines
463 B
var $ = require('../internals/export');
|
|
var iterate = require('../internals/iterate');
|
|
var createProperty = require('../internals/create-property');
|
|
|
|
// `Object.fromEntries` method
|
|
// https://github.com/tc39/proposal-object-from-entries
|
|
$({ target: 'Object', stat: true }, {
|
|
fromEntries: function fromEntries(iterable) {
|
|
var obj = {};
|
|
iterate(iterable, function (k, v) {
|
|
createProperty(obj, k, v);
|
|
}, undefined, true);
|
|
return obj;
|
|
}
|
|
});
|
|
|