flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
16
VISUALIZACION/node_modules/es-abstract/2023/CanBeHeldWeakly.js
generated
vendored
Executable file
16
VISUALIZACION/node_modules/es-abstract/2023/CanBeHeldWeakly.js
generated
vendored
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
var KeyForSymbol = require('./KeyForSymbol');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/14.0/#sec-canbeheldweakly
|
||||
|
||||
module.exports = function CanBeHeldWeakly(v) {
|
||||
if (Type(v) === 'Object') {
|
||||
return true; // step 1
|
||||
}
|
||||
if (Type(v) === 'Symbol' && typeof KeyForSymbol(v) === 'undefined') {
|
||||
return true; // step 2
|
||||
}
|
||||
return false; // step 3
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue