main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
568 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var getBuiltIn = require('../internals/get-built-in');
|
---|
| 3 | var uncurryThis = require('../internals/function-uncurry-this');
|
---|
| 4 |
|
---|
| 5 | var Symbol = getBuiltIn('Symbol');
|
---|
| 6 | var keyFor = Symbol.keyFor;
|
---|
| 7 | var thisSymbolValue = uncurryThis(Symbol.prototype.valueOf);
|
---|
| 8 |
|
---|
| 9 | // `Symbol.isRegisteredSymbol` method
|
---|
| 10 | // https://tc39.es/proposal-symbol-predicates/#sec-symbol-isregisteredsymbol
|
---|
| 11 | module.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.