⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
node_modules
/
get-symbol-description
/
Edit File: index.js
'use strict'; var GetIntrinsic = require('get-intrinsic'); var callBound = require('call-bind/callBound'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var getGlobalSymbolDescription = GetIntrinsic('%Symbol.keyFor%', true); var thisSymbolValue = callBound('%Symbol.prototype.valueOf%', true); var symToStr = callBound('Symbol.prototype.toString', true); var getInferredName = require('./getInferredName'); /* eslint-disable consistent-return */ module.exports = callBound('%Symbol.prototype.description%', true) || function getSymbolDescription(symbol) { if (!thisSymbolValue) { throw new $SyntaxError('Symbols are not supported in this environment'); } // will throw if not a symbol primitive or wrapper object var sym = thisSymbolValue(symbol); if (getInferredName) { var name = getInferredName(sym); if (name === '') { return; } return name.slice(1, -1); // name.slice('['.length, -']'.length); } var desc; if (getGlobalSymbolDescription) { desc = getGlobalSymbolDescription(sym); if (typeof desc === 'string') { return desc; } } desc = symToStr(sym).slice(7, -1); // str.slice('Symbol('.length, -')'.length); if (desc) { return desc; } };
Simpan