⚝
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
/
unbox-primitive
/
View File Name :
index.js
'use strict'; var whichBoxedPrimitive = require('which-boxed-primitive'); var callBound = require('call-bind/callBound'); var hasSymbols = require('has-symbols')(); var hasBigInts = require('has-bigints')(); var stringToString = callBound('String.prototype.toString'); var numberValueOf = callBound('Number.prototype.valueOf'); var booleanValueOf = callBound('Boolean.prototype.valueOf'); var symbolValueOf = hasSymbols && callBound('Symbol.prototype.valueOf'); var bigIntValueOf = hasBigInts && callBound('BigInt.prototype.valueOf'); module.exports = function unboxPrimitive(value) { var which = whichBoxedPrimitive(value); if (typeof which !== 'string') { throw new TypeError(which === null ? 'value is an unboxed primitive' : 'value is a non-boxed-primitive object'); } if (which === 'String') { return stringToString(value); } if (which === 'Number') { return numberValueOf(value); } if (which === 'Boolean') { return booleanValueOf(value); } if (which === 'Symbol') { if (!hasSymbols) { throw new EvalError('somehow this environment does not have Symbols, but you have a boxed Symbol value. Please report this!'); } return symbolValueOf(value); } if (which === 'BigInt') { return bigIntValueOf(value); } throw new RangeError('unknown boxed primitive found: ' + which); };