flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
18
BACK_BACK/node_modules/es-abstract/2023/thisSymbolValue.js
generated
vendored
Executable file
18
BACK_BACK/node_modules/es-abstract/2023/thisSymbolValue.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var $SyntaxError = require('es-errors/syntax');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
|
||||
|
||||
module.exports = function thisSymbolValue(value) {
|
||||
if (!$SymbolValueOf) {
|
||||
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
|
||||
}
|
||||
if (typeof value === 'symbol') {
|
||||
return value;
|
||||
}
|
||||
return $SymbolValueOf(value);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue