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-map');
  5. require('../../modules/esnext.weak-map.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 WeakMap = path.WeakMap;
  11. var $from = WeakMap.from;
  12. module.exports = function from(source, mapFn, thisArg) {
  13. return call($from, isCallable(this) ? this : WeakMap, source, mapFn, thisArg);
  14. };