source: imaps-frontend/node_modules/object.fromentries/implementation.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 668 bytes
RevLine 
[d565449]1'use strict';
2
3var AddEntriesFromIterable = require('es-abstract/2024/AddEntriesFromIterable');
4var CreateDataPropertyOrThrow = require('es-abstract/2024/CreateDataPropertyOrThrow');
5var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
6var ToPropertyKey = require('es-abstract/2024/ToPropertyKey');
7
8var adder = function addDataProperty(key, value) {
9 var O = this; // eslint-disable-line no-invalid-this
10 var propertyKey = ToPropertyKey(key);
11 CreateDataPropertyOrThrow(O, propertyKey, value);
12};
13
14module.exports = function fromEntries(iterable) {
15 RequireObjectCoercible(iterable);
16
17 return AddEntriesFromIterable({}, iterable, adder);
18};
Note: See TracBrowser for help on using the repository browser.