⚝
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
/
nodejs
/
core-js-pure
/
internals
/
View File Name :
error-to-string.js
'use strict'; var DESCRIPTORS = require('../internals/descriptors'); var fails = require('../internals/fails'); var anObject = require('../internals/an-object'); var create = require('../internals/object-create'); var normalizeStringArgument = require('../internals/normalize-string-argument'); var nativeErrorToString = Error.prototype.toString; var INCORRECT_TO_STRING = fails(function () { if (DESCRIPTORS) { // Chrome 32- incorrectly call accessor // eslint-disable-next-line es/no-object-defineproperty -- safe var object = create(Object.defineProperty({}, 'name', { get: function () { return this === object; } })); if (nativeErrorToString.call(object) !== 'true') return true; } // FF10- does not properly handle non-strings return nativeErrorToString.call({ message: 1, name: 2 }) !== '2: 1' // IE8 does not properly handle defaults || nativeErrorToString.call({}) !== 'Error'; }); module.exports = INCORRECT_TO_STRING ? function toString() { var O = anObject(this); var name = normalizeStringArgument(O.name, 'Error'); var message = normalizeStringArgument(O.message); return !name ? message : !message ? name : name + ': ' + message; } : nativeErrorToString;