{"_id":"error.iserror","_rev":"3-3b080ab57d10d3e340d17fe5c8309546","name":"error.iserror","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"error.iserror","version":"1.0.0","keywords":["javascript","ecmascript","polyfill","shim","Error","isError","es-shim API"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"error.iserror@1.0.0","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/es-shims/Error.isError#readme","bugs":{"url":"https://github.com/es-shims/Error.isError/issues"},"dist":{"shasum":"f8ae27c651afe7a8494375bbaeb1acabd1fa43da","tarball":"https://registry.npmjs.org/error.iserror/-/error.iserror-1.0.0.tgz","fileCount":17,"integrity":"sha512-QMPUgn6Tow/U3m59PIfCIGCDbj3U57KA+hdgbZYvqqJnpU5xhc76qaTAnSXVFuPQaWqxoJ3Qulm6R0Xf5q0BtA==","signatures":[{"sig":"MEUCIFR+ZasaYOWI72VcJmrwNIV+gDMFnhD+FuGKv3EXFh+ZAiEAzWxekgiLiUThhg1j+BBKBBZy1J0Lv0igaNa7ml/BZk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19008},"main":"index.js","browser":{"util":false},"engines":{"node":">= 0.4"},"exports":{".":"./index.js","./auto":"./auto.js","./shim":"./shim.js","./polyfill":"./polyfill.js","./package.json":"./package.json","./implementation":"./implementation.js"},"gitHead":"fbf9f68d0d6633fabca42ba17072c35e46c282c6","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run --silent lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"es-shim-api --type=function","posttest":"npx npm@'>=10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/es-shims/Error.isError.git","type":"git"},"_npmVersion":"10.9.0","description":"An ESnext spec-compliant `Error.isError` shim/polyfill/replacement that works as far down as ES3","directories":{},"_nodeVersion":"22.10.0","dependencies":{"gopd":"^1.0.1","es-errors":"^1.3.0","has-tostringtag":"^1.0.2","define-properties":"^1.2.1"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","evalmd":"^0.0.19","iframe":"^1.0.0","for-each":"^0.3.3","call-bind":"^1.0.7","npmignore":"^0.3.1","in-publish":"^2.0.1","@types/node":"^22.7.5","@es-shims/api":"^3.0.1","auto-changelog":"^2.5.0","object-inspect":"^1.13.2","es-value-fixtures":"^1.5.0","safe-publish-latest":"^2.0.0","functions-have-names":"^1.2.3","@ljharb/eslint-config":"^21.1.1"},"_npmOperationalInternal":{"tmp":"tmp/error.iserror_1.0.0_1729198456284_0.2529878454741874","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"error.iserror","version":"1.0.1","keywords":["javascript","ecmascript","polyfill","shim","Error","isError","es-shim API"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","_id":"error.iserror@1.0.1","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/es-shims/Error.isError#readme","bugs":{"url":"https://github.com/es-shims/Error.isError/issues"},"dist":{"shasum":"9d20d9c5618dbe5bf45a69c9e9c6fa5b5b97d6ca","tarball":"https://registry.npmjs.org/error.iserror/-/error.iserror-1.0.1.tgz","fileCount":17,"integrity":"sha512-O8MOlzJ8qGlHXMYH4ozW0jl9Jaggq6wpwGUt4Qu1ZBmj3H11+SsqNMsTDkAa+kPwgPXR/PN1UtGj619sR2rEEA==","signatures":[{"sig":"MEYCIQC5HgmuEUFCYDMt6WevWGsGRJiTX5Mhc2KLCOtzrjBjbQIhAMTsXRbpGCkaHDitkJ7q2UrL7B2OpEMVfNSNuxdLiUOS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20036},"main":"index.js","browser":{"util":false},"engines":{"node":">= 0.4"},"exports":{".":"./index.js","./auto":"./auto.js","./shim":"./shim.js","./polyfill":"./polyfill.js","./package.json":"./package.json","./implementation":"./implementation.js"},"gitHead":"60af678f5ad261ff0b2ad8bd40172b7d276aa0a6","scripts":{"lint":"eslint --ext=js,mjs .","test":"npm run tests-only","prelint":"evalmd README.md","prepack":"npmignore --auto --commentLines=autogenerated","pretest":"npm run --silent lint","version":"auto-changelog && git add CHANGELOG.md","postlint":"es-shim-api --type=function","posttest":"npx npm@'>=10.2' audit --production","prepublish":"not-in-publish || npm run prepublishOnly","tests-only":"nyc tape 'test/**/*.js'","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"","prepublishOnly":"safe-publish-latest"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"testling":{"files":"test/index.js"},"repository":{"url":"git+https://github.com/es-shims/Error.isError.git","type":"git"},"_npmVersion":"11.3.0","description":"An ESnext spec-compliant `Error.isError` shim/polyfill/replacement that works as far down as ES3","directories":{},"_nodeVersion":"24.2.0","dependencies":{"gopd":"^1.2.0","call-bind":"^1.0.8","es-errors":"^1.3.0","call-bound":"^1.0.4","has-tostringtag":"^1.0.2","define-properties":"^1.2.1"},"publishConfig":{"ignore":[".github/workflows"]},"_hasShrinkwrap":false,"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","hideCredit":true,"unreleased":false,"commitLimit":false,"backfillLimit":false},"devDependencies":{"nyc":"^10.3.2","tape":"^5.9.0","eslint":"=8.8.0","evalmd":"^0.0.19","iframe":"^1.0.0","encoding":"^0.1.13","for-each":"^0.3.5","npmignore":"^0.3.1","in-publish":"^2.0.1","@types/node":"^22.15.21","@es-shims/api":"^3.0.2","auto-changelog":"^2.5.0","object-inspect":"^1.13.4","es-value-fixtures":"^1.7.1","safe-publish-latest":"^2.0.0","functions-have-names":"^1.2.3","@ljharb/eslint-config":"^21.1.1"},"_npmOperationalInternal":{"tmp":"tmp/error.iserror_1.0.1_1749747955547_0.7619057861066014","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"error.iserror","version":"1.0.2","description":"An ESnext spec-compliant `Error.isError` shim/polyfill/replacement that works as far down as ES3","main":"index.js","browser":{"util":false},"exports":{".":"./index.js","./auto":"./auto.js","./polyfill":"./polyfill.js","./implementation":"./implementation.js","./shim":"./shim.js","./package.json":"./package.json"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","pretest":"npm run --silent lint","test":"npm run tests-only","posttest":"npx npm@'>=10.2' audit --production","tests-only":"nyc tape 'test/**/*.js'","prelint":"evalmd README.md","lint":"eslint --ext=js,mjs .","postlint":"es-shim-api --type=function","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/es-shims/Error.isError.git"},"keywords":["javascript","ecmascript","polyfill","shim","Error","isError","es-shim API"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/es-shims/Error.isError/issues"},"homepage":"https://github.com/es-shims/Error.isError#readme","dependencies":{"call-bind":"^1.0.8","call-bound":"^1.0.4","define-properties":"^1.2.1","es-errors":"^1.3.0","gopd":"^1.2.0","has-tostringtag":"^1.0.2"},"devDependencies":{"@es-shims/api":"^3.0.2","@ljharb/eslint-config":"^21.2.0","@types/node":"^22.16.5","auto-changelog":"^2.5.0","encoding":"^0.1.13","es-value-fixtures":"^1.7.1","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.5","functions-have-names":"^1.2.3","iframe":"^1.0.0","in-publish":"^2.0.1","npmignore":"^0.3.1","nyc":"^10.3.2","object-inspect":"^1.13.4","safe-publish-latest":"^2.0.0","tape":"^5.9.0"},"testling":{"files":"test/index.js"},"engines":{"node":">= 0.4"},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"publishConfig":{"ignore":[".github/workflows"]},"_id":"error.iserror@1.0.2","gitHead":"0517a53839cb1bf00a8060656691b5263588de86","_nodeVersion":"24.4.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-6cQhiorwyr/M0kBPEInc+XyzGpsCPzlIg2B6iHRAhWtU+sdoY0jqG6u5BPLpWdn/rUBqmHrmXKhgXG65JUuX8g==","shasum":"9321a1d8253f17b93c45a21db72fe9f8394e0cbb","tarball":"https://registry.npmjs.org/error.iserror/-/error.iserror-1.0.2.tgz","fileCount":18,"unpackedSize":21635,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFhC90FKlYEH84iLgyFhESP4nX7kPcsKZSDSRyDlyj7UAiBrlEV7Yc25cPudS1feI5a6faPv0IQN54DoLTtd9mcbCw=="}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/error.iserror_1.0.2_1753394209463_0.5387046680173744"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-17T20:54:16.283Z","modified":"2025-07-24T21:56:49.907Z","1.0.0":"2024-10-17T20:54:16.517Z","1.0.1":"2025-06-12T17:05:55.713Z","1.0.2":"2025-07-24T21:56:49.731Z"},"bugs":{"url":"https://github.com/es-shims/Error.isError/issues"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","homepage":"https://github.com/es-shims/Error.isError#readme","keywords":["javascript","ecmascript","polyfill","shim","Error","isError","es-shim API"],"repository":{"type":"git","url":"git+https://github.com/es-shims/Error.isError.git"},"description":"An ESnext spec-compliant `Error.isError` shim/polyfill/replacement that works as far down as ES3","maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"readme":"# Error.isError <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![github actions][actions-image]][actions-url]\n[![coverage][codecov-image]][codecov-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nAn ESnext spec-compliant `Error.isError` shim/polyfill/replacement that works as far down as ES3.\n\nThis package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the proposed [spec](https://tc39.es/proposal-is-error/).\n\n## Getting started\n\n```sh\nnpm install --save error.iserror\n```\n\n## Usage/Examples\n\n```js\nconst isError = require('error.iserror');\nvar assert = require('assert');\n\nassert.equal(isError(undefined), false);\nassert.equal(isError(null), false);\nassert.equal(isError({}), false);\nassert.equal(isError([]), false);\nassert.equal(isError(Error), false);\nassert.equal(isError({ __proto__: Error.prototype, constructor: Error }), false);\n\nassert.equal(isError(new Error()), true);\nassert.equal(isError(new EvalError()), true);\nassert.equal(isError(new RangeError()), true);\nassert.equal(isError(new ReferenceError()), true);\nassert.equal(isError(new SyntaxError()), true);\nassert.equal(isError(new TypeError()), true);\nassert.equal(isError(new URIError()), true);\n\nif (typeof AggregateError === 'function') {\n    assert.equal(isError(new AggregateError([])), true);\n}\nif (typeof SuppressedError === 'function') {\n    assert.equal(isError(new SuppressedError()), true);\n}\n\n// note: engines that have `Symbol.toStringTag`, and lack structuredClone, and lack other brand-checking\n// mechanisms, are only capable of brand-checking Error objects when they lack a `Symbol.toStringTag` property in their\n// prototype chain. An object with it will give the wrong answer.\n// This affects node 6 - 9, Chrome 49 - 97, Safari 10 - 14, Edge 15 - 18\n\nassert.equal(isError({ __proto__: Error.prototype, constructor: Error, [Symbol.toStringTag]: 'Error' }), false);\n\nconst err = Object.assign(new Error(), { [Symbol.toStringTag]: 'Non-Error' });\nObject.setPrototypeOf(err, null);\nassert.equal(isError(err), true);\n\n\n// note: node < v24.3 has an `Error.isError` that does not work correctly with DOMException objects\nassert.equal(isError(new DOMException()), true);\n```\n\n```js\nvar shimIsError = require('error.iserror/shim');\nconst getPolyfill = require('error.iserror/polyfill');\nvar assert = require('assert');\n/* when Error.isError is not present */\ndelete Error.isError;\nvar shimmed = shimIsError();\n\nassert.equal(shimmed, getPolyfill());\nassert.deepEqual(Error.isError(new Error()), isError(new Error()));\n```\n\n```js\nvar shimIsError = require('error.iserror/shim');\nvar assert = require('assert');\n/* when Error.isError is present */\nvar shimmed = shimIsError();\n\nassert.equal(shimmed, Error.isError);\nassert.deepEqual(Error.isError(new Error()), isError(new Error()));\n```\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/error.iserror\n[npm-version-svg]: https://versionbadg.es/es-shims/Error.isError.svg\n[deps-svg]: https://david-dm.org/es-shims/Error.isError.svg\n[deps-url]: https://david-dm.org/es-shims/Error.isError\n[dev-deps-svg]: https://david-dm.org/es-shims/Error.isError/dev-status.svg\n[dev-deps-url]: https://david-dm.org/es-shims/Error.isError#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/error.iserror.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/error.iserror.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/error.iserror.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=error.iserror\n[codecov-image]: https://codecov.io/gh/es-shims/Error.isError/branch/main/graphs/badge.svg\n[codecov-url]: https://app.codecov.io/gh/es-shims/Error.isError/\n[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Error.isError\n[actions-url]: https://github.com/es-shims/Error.isError/actions\n","readmeFilename":"README.md"}