a254d56bbee113423226ae264e9bbe737a41afcfc88b7ea399e47f349f1d92332888a081f09a9a21b6c4be173f8fb8139ef715593d88537676de74832ef6a0 743 B

1234567891011121314151617181920212223
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var uncurryThis = require('../internals/function-uncurry-this');
  4. var aSet = require('../internals/a-set');
  5. var iterate = require('../internals/set-iterate');
  6. var toString = require('../internals/to-string');
  7. var arrayJoin = uncurryThis([].join);
  8. var push = uncurryThis([].push);
  9. // `Set.prototype.join` method
  10. // https://github.com/tc39/proposal-collection-methods
  11. $({ target: 'Set', proto: true, real: true, forced: true }, {
  12. join: function join(separator) {
  13. var set = aSet(this);
  14. var sep = separator === undefined ? ',' : toString(separator);
  15. var array = [];
  16. iterate(set, function (value) {
  17. push(array, value);
  18. });
  19. return arrayJoin(array, sep);
  20. }
  21. });