1 | ;
|
2 | var anObject = require('../internals/an-object');
|
3 |
|
4 | // https://tc39.github.io/proposal-setmap-offrom/
|
5 | module.exports = function (C, adder, ENTRY) {
|
6 | return function of() {
|
7 | var result = new C();
|
8 | var length = arguments.length;
|
9 | for (var index = 0; index < length; index++) {
|
10 | var entry = arguments[index];
|
11 | if (ENTRY) adder(result, anObject(entry)[0], entry[1]);
|
12 | else adder(result, entry);
|
13 | } return result;
|
14 | };
|
15 | };
|