debian-mirror-gitlab/core-js/internals/well-known-symbol.js

13 lines
410 B
JavaScript
Raw Normal View History

2019-09-25 13:30:05 +05:30
var global = require('../internals/global');
var shared = require('../internals/shared');
var uid = require('../internals/uid');
var NATIVE_SYMBOL = require('../internals/native-symbol');
var Symbol = global.Symbol;
var store = shared('wks');
module.exports = function (name) {
return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
|| (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};