define-well-known-symbol.js 456 B

1234567891011
  1. var path = require('../internals/path');
  2. var hasOwn = require('../internals/has-own-property');
  3. var wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');
  4. var defineProperty = require('../internals/object-define-property').f;
  5. module.exports = function (NAME) {
  6. var Symbol = path.Symbol || (path.Symbol = {});
  7. if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
  8. value: wrappedWellKnownSymbolModule.f(NAME)
  9. });
  10. };