source: trip-planner-front/node_modules/core-js/internals/well-known-symbol.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

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