massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / core-js / modules / esnext.set.join.js
1 'use strict';
2 var IS_PURE = require('../internals/is-pure');
3 var $ = require('../internals/export');
4 var uncurryThis = require('../internals/function-uncurry-this');
5 var anObject = require('../internals/an-object');
6 var toString = require('../internals/to-string');
7 var getSetIterator = require('../internals/get-set-iterator');
8 var iterate = require('../internals/iterate');
9
10 var arrayJoin = uncurryThis([].join);
11 var push = [].push;
12
13 // `Set.prototype.join` method
14 // https://github.com/tc39/proposal-collection-methods
15 $({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
16   join: function join(separator) {
17     var set = anObject(this);
18     var iterator = getSetIterator(set);
19     var sep = separator === undefined ? ',' : toString(separator);
20     var result = [];
21     iterate(iterator, push, { that: result, IS_ITERATOR: true });
22     return arrayJoin(result, sep);
23   }
24 });