source: imaps-frontend/node_modules/core-js/modules/es.symbol.key-for.js

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

F4 Finalna Verzija

  • Property mode set to 100644
File size: 758 bytes
Line 
1'use strict';
2var $ = require('../internals/export');
3var hasOwn = require('../internals/has-own-property');
4var isSymbol = require('../internals/is-symbol');
5var tryToString = require('../internals/try-to-string');
6var shared = require('../internals/shared');
7var NATIVE_SYMBOL_REGISTRY = require('../internals/symbol-registry-detection');
8
9var SymbolToStringRegistry = shared('symbol-to-string-registry');
10
11// `Symbol.keyFor` method
12// https://tc39.es/ecma262/#sec-symbol.keyfor
13$({ target: 'Symbol', stat: true, forced: !NATIVE_SYMBOL_REGISTRY }, {
14 keyFor: function keyFor(sym) {
15 if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol');
16 if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
17 }
18});
Note: See TracBrowser for help on using the repository browser.