source: imaps-frontend/node_modules/core-js/internals/well-known-symbol.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 804 bytes
Line 
1'use strict';
2var globalThis = require('../internals/global-this');
3var shared = require('../internals/shared');
4var hasOwn = require('../internals/has-own-property');
5var uid = require('../internals/uid');
6var NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');
7var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');
8
9var Symbol = globalThis.Symbol;
10var WellKnownSymbolsStore = shared('wks');
11var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
12
13module.exports = function (name) {
14 if (!hasOwn(WellKnownSymbolsStore, name)) {
15 WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
16 ? Symbol[name]
17 : createWellKnownSymbol('Symbol.' + name);
18 } return WellKnownSymbolsStore[name];
19};
Note: See TracBrowser for help on using the repository browser.