source: node_modules/core-js-pure/internals/symbol-is-registered.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 568 bytes
Line 
1'use strict';
2var getBuiltIn = require('../internals/get-built-in');
3var uncurryThis = require('../internals/function-uncurry-this');
4
5var Symbol = getBuiltIn('Symbol');
6var keyFor = Symbol.keyFor;
7var thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);
8
9// `Symbol.isRegisteredSymbol` method
10// https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol
11module.exports = Symbol.isRegisteredSymbol || function isRegisteredSymbol(value) {
12 try {
13 return keyFor(thisSymbolValue(value)) !== undefined;
14 } catch (error) {
15 return false;
16 }
17};
Note: See TracBrowser for help on using the repository browser.