Node-Red configuration
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

well-known-symbol.js 804B

12345678910111213141516171819
  1. 'use strict';
  2. var globalThis = require('../internals/global-this');
  3. var shared = require('../internals/shared');
  4. var hasOwn = require('../internals/has-own-property');
  5. var uid = require('../internals/uid');
  6. var NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');
  7. var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');
  8. var Symbol = globalThis.Symbol;
  9. var WellKnownSymbolsStore = shared('wks');
  10. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
  11. module.exports = function (name) {
  12. if (!hasOwn(WellKnownSymbolsStore, name)) {
  13. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
  14. ? Symbol[name]
  15. : createWellKnownSymbol('Symbol.' + name);
  16. } return WellKnownSymbolsStore[name];
  17. };