Files
bzzz/install/config-ui/node_modules/es-abstract/2023/CanBeHeldWeakly.js
anthonyrawlins c177363a19 Save current BZZZ config-ui state before CHORUS branding update
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-19 00:19:00 +10:00

18 lines
403 B
JavaScript

'use strict';
var isObject = require('es-object-atoms/isObject');
var KeyForSymbol = require('./KeyForSymbol');
// https://262.ecma-international.org/14.0/#sec-canbeheldweakly
module.exports = function CanBeHeldWeakly(v) {
if (isObject(v)) {
return true; // step 1
}
if (typeof v === 'symbol' && typeof KeyForSymbol(v) === 'undefined') {
return true; // step 2
}
return false; // step 3
};