of.js 464 B

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