from.js 594 B

12345678910111213141516
  1. 'use strict';
  2. require('../../modules/es.array.iterator');
  3. require('../../modules/es.string.iterator');
  4. require('../../modules/es.weak-set');
  5. require('../../modules/esnext.weak-set.from');
  6. require('../../modules/web.dom-collections.iterator');
  7. var call = require('../../internals/function-call');
  8. var isCallable = require('../../internals/is-callable');
  9. var path = require('../../internals/path');
  10. var WeakSet = path.WeakSet;
  11. var $from = WeakSet.from;
  12. module.exports = function from(source, mapFn, thisArg) {
  13. return call($from, isCallable(this) ? this : WeakSet, source, mapFn, thisArg);
  14. };