of.js 464 B

1234567891011121314
  1. 'use strict';
  2. require('../../modules/es.array.iterator');
  3. require('../../modules/es.weak-map');
  4. require('../../modules/esnext.weak-map.of');
  5. var path = require('../../internals/path');
  6. var apply = require('../../internals/function-apply');
  7. var isCallable = require('../../internals/is-callable');
  8. var WeakMap = path.WeakMap;
  9. var weakMapOf = WeakMap.of;
  10. module.exports = function of() {
  11. return apply(weakMapOf, isCallable(this) ? this : WeakMap, arguments);
  12. };