1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 19:23:18 +00:00
musix-oss/node_modules/core-js/modules/esnext.map.merge.js

22 lines
699 B
JavaScript
Raw Normal View History

2019-10-10 13:43:04 +00:00
'use strict';
var $ = require('../internals/export');
var IS_PURE = require('../internals/is-pure');
var anObject = require('../internals/an-object');
var aFunction = require('../internals/a-function');
var iterate = require('../internals/iterate');
// `Map.prototype.merge` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
// eslint-disable-next-line no-unused-vars
merge: function merge(iterable /* ...iterbles */) {
var map = anObject(this);
var setter = aFunction(map.set);
var i = 0;
while (i < arguments.length) {
iterate(arguments[i++], setter, map, true);
}
return map;
}
});