1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-11-10 11:20:19 +00:00
musix-oss/node_modules/core-js/modules/esnext.map.merge.js
2020-03-03 22:30:50 +02:00

22 lines
699 B
JavaScript

'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;
}
});