mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
18 lines
752 B
JavaScript
18 lines
752 B
JavaScript
var global = require('../internals/global');
|
|
var shared = require('../internals/shared');
|
|
var has = require('../internals/has');
|
|
var uid = require('../internals/uid');
|
|
var NATIVE_SYMBOL = require('../internals/native-symbol');
|
|
var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');
|
|
|
|
var WellKnownSymbolsStore = shared('wks');
|
|
var Symbol = global.Symbol;
|
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
|
|
|
|
module.exports = function (name) {
|
|
if (!has(WellKnownSymbolsStore, name)) {
|
|
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
|
|
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
|
} return WellKnownSymbolsStore[name];
|
|
};
|