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
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var AddEntriesFromIterable = require('es-abstract/2024/AddEntriesFromIterable');
|
---|
| 4 | var CreateDataPropertyOrThrow = require('es-abstract/2024/CreateDataPropertyOrThrow');
|
---|
| 5 | var RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible');
|
---|
| 6 | var ToPropertyKey = require('es-abstract/2024/ToPropertyKey');
|
---|
| 7 |
|
---|
| 8 | var 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 |
|
---|
| 14 | module.exports = function fromEntries(iterable) {
|
---|
| 15 | RequireObjectCoercible(iterable);
|
---|
| 16 |
|
---|
| 17 | return AddEntriesFromIterable({}, iterable, adder);
|
---|
| 18 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.