{"_id":"check-error","_rev":"3324805","name":"check-error","description":"Error comparison and information related utility for node and the browser","dist-tags":{"latest":"2.1.1"},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"time":{"modified":"2024-06-11T09:31:47.000Z","created":"2016-06-03T15:32:19.225Z","2.1.1":"2024-05-08T20:49:55.268Z","2.1.0":"2024-05-08T14:00:31.754Z","1.0.3":"2023-09-27T09:22:48.055Z","2.0.0":"2023-07-21T20:46:54.219Z","1.0.2":"2016-06-27T21:13:56.593Z","1.0.1":"2016-06-07T09:22:16.414Z","1.0.0":"2016-06-03T15:32:19.225Z"},"users":{"justjavac":true},"author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"versions":{"2.1.1":{"version":"2.1.1","name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"type":"module","main":"./index.js","module":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"lint":"eslint --ignore-path .gitignore index.js test/","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint","test":"npm run test:node && npm run test:browser","test:browser":"web-test-runner","test:node":"mocha"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es6"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":"off","max-statements":"off","prefer-arrow-callback":"off","prefer-reflect":"off"}},"devDependencies":{"@web/test-runner":"^0.17.0","browserify":"^13.0.0","browserify-istanbul":"^1.0.0","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","mocha":"^9.1.2","semantic-release":"^4.3.5","simple-assert":"^2.0.0","validate-commit-msg":"^2.3.1"},"engines":{"node":">= 16"},"_id":"check-error@2.1.1","gitHead":"36f9271a23f11ab99301a9c0a39f342767267c8d","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_nodeVersion":"22.1.0","_npmVersion":"10.7.0","dist":{"shasum":"87eb876ae71ee388fa0471fe423f494be1d96ccc","size":3736,"noattachment":false,"key":"/check-error/-/check-error-2.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-2.1.1.tgz"},"_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"directories":{},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-error_2.1.1_1715201395126_0.024704107879484072"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-08T20:49:55.268Z","publish_time":1715201395268,"_source_registry_name":"default","_cnpm_publish_time":1715201395268},"2.1.0":{"version":"2.1.0","name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"type":"module","main":"./index.js","module":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"build":"rollup -c rollup.config.js","lint":"eslint --ignore-path .gitignore index.js test/","prepublish":"npm run build","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint && npm run build","test":"npm run test:node && npm run test:browser","test:browser":"web-test-runner","test:node":"mocha"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es6"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":"off","max-statements":"off","prefer-arrow-callback":"off","prefer-reflect":"off"}},"devDependencies":{"@rollup/plugin-commonjs":"^21.0.0","@rollup/plugin-node-resolve":"^13.0.5","@web/test-runner":"^0.17.0","browserify":"^13.0.0","browserify-istanbul":"^1.0.0","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","mocha":"^9.1.2","rollup":"^2.58.0","semantic-release":"^4.3.5","simple-assert":"^2.0.0","validate-commit-msg":"^2.3.1"},"engines":{"node":">= 16"},"_id":"check-error@2.1.0","gitHead":"d3622a0af07ddafe5275e452e3d780bbfda14110","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_nodeVersion":"22.1.0","_npmVersion":"10.7.0","dist":{"shasum":"18fc919e9092304eb33e7b12b8a218902f79efb6","size":4206,"noattachment":false,"key":"/check-error/-/check-error-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-2.1.0.tgz"},"_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"directories":{},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-error_2.1.0_1715176831585_0.944098384684732"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-05-08T14:00:31.754Z","publish_time":1715176831754,"_source_registry_name":"default","_cnpm_publish_time":1715176831754},"1.0.3":{"name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"build":"browserify --bare $npm_package_main --standalone checkError -o check-error.js","lint":"eslint --ignore-path .gitignore .","prepublish":"npm run build","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint","test":"npm run test:node && npm run test:browser && npm run upload-coverage","test:browser":"karma start --singleRun=true","test:node":"istanbul cover _mocha","upload-coverage":"lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es5"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":0,"max-statements":0}},"dependencies":{"get-func-name":"^2.0.2"},"devDependencies":{"browserify":"^13.0.0","browserify-istanbul":"^1.0.0","coveralls":"2.11.9","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","istanbul":"^0.4.2","karma":"^0.13.22","karma-browserify":"^5.0.2","karma-coverage":"^0.5.5","karma-mocha":"^0.2.2","karma-phantomjs-launcher":"^1.0.0","karma-sauce-launcher":"^0.3.1","lcov-result-merger":"^1.0.2","mocha":"^2.4.5","phantomjs-prebuilt":"^2.1.5","semantic-release":"^4.3.5","simple-assert":"^1.0.0","travis-after-all":"^1.4.4","validate-commit-msg":"^2.3.1"},"engines":{"node":"*"},"version":"1.0.3","gitHead":"a0052c7ec4e37333927cf80bad9f8d84ad260b79","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_id":"check-error@1.0.3","_nodeVersion":"20.0.0","_npmVersion":"9.6.4","dist":{"shasum":"a6502e4312a7ee969f646e83bb3ddd56281bd694","size":4586,"noattachment":false,"key":"/check-error/-/check-error-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-1.0.3.tgz"},"_npmUser":{"name":"keithamus","email":"npm@keithcirkel.co.uk"},"directories":{},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-error_1.0.3_1695806567894_0.17013246235074675"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-27T09:22:48.055Z","publish_time":1695806568055,"_source_registry_name":"default","_cnpm_publish_time":1695806568055},"2.0.0":{"name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"type":"module","main":"./index.js","module":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"build":"rollup -c rollup.config.js","lint":"eslint --ignore-path .gitignore index.js test/","prepublish":"npm run build","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint && npm run build","test":"npm run test:node && npm run test:browser","test:browser":"web-test-runner --node-resolve test/","test:node":"mocha"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es6"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":"off","max-statements":"off","prefer-arrow-callback":"off"}},"devDependencies":{"@rollup/plugin-commonjs":"^21.0.0","@rollup/plugin-node-resolve":"^13.0.5","@web/test-runner":"^0.17.0","browserify":"^13.0.0","browserify-istanbul":"^1.0.0","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","mocha":"^9.1.2","rollup":"^2.58.0","semantic-release":"^4.3.5","simple-assert":"^2.0.0","validate-commit-msg":"^2.3.1"},"engines":{"node":">= 16"},"version":"2.0.0","gitHead":"6a8e4b37e368f0bd806712cce77e6c2c7b3e5018","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_id":"check-error@2.0.0","_nodeVersion":"16.20.1","_npmVersion":"9.6.4","dist":{"shasum":"589a4f201b6256fd93a2d165089fe43d2676d8c6","size":4083,"noattachment":false,"key":"/check-error/-/check-error-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-2.0.0.tgz"},"_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"directories":{},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-error_2.0.0_1689972414074_0.055565608674451816"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-07-21T20:46:54.219Z","publish_time":1689972414219,"_source_registry_name":"default","_cnpm_publish_time":1689972414219},"1.0.2":{"name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"files":["index.js","check-error.js"],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"build":"browserify --bare $npm_package_main --standalone checkError -o check-error.js","lint":"eslint --ignore-path .gitignore .","prepublish":"npm run build","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint","test":"npm run test:node && npm run test:browser && npm run upload-coverage","test:browser":"karma start --singleRun=true","test:node":"istanbul cover _mocha","upload-coverage":"lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es5"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":0,"max-statements":0}},"dependencies":{},"devDependencies":{"browserify":"^13.0.0","browserify-istanbul":"^1.0.0","coveralls":"2.11.9","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","istanbul":"^0.4.2","karma":"^0.13.22","karma-browserify":"^5.0.2","karma-coverage":"^0.5.5","karma-mocha":"^0.2.2","karma-phantomjs-launcher":"^1.0.0","karma-sauce-launcher":"^0.3.1","lcov-result-merger":"^1.0.2","mocha":"^2.4.5","phantomjs-prebuilt":"^2.1.5","semantic-release":"^4.3.5","simple-assert":"^1.0.0","travis-after-all":"^1.4.4","validate-commit-msg":"^2.3.1"},"engines":{"node":"*"},"version":"1.0.2","gitHead":"22a3985d2ec528015774206703332790aec4dea7","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_id":"check-error@1.0.2","_shasum":"574d312edd88bb5dd8912e9286dd6c0aed4aac82","_from":".","_npmVersion":"3.10.2","_nodeVersion":"0.10.46","_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"dist":{"shasum":"574d312edd88bb5dd8912e9286dd6c0aed4aac82","size":4986,"noattachment":false,"key":"/check-error/-/check-error-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-1.0.2.tgz"},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/check-error-1.0.2.tgz_1467062034464_0.8010135267395526"},"directories":{},"publish_time":1467062036593,"_cnpm_publish_time":1467062036593,"_hasShrinkwrap":false},"1.0.1":{"name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"files":["index.js","check-error.js"],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"build":"browserify --bare $npm_package_main --standalone checkError -o check-error.js","lint":"eslint --ignore-path .gitignore .","prepublish":"npm run build","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint","test":"npm run test:node && npm run test:browser && npm run upload-coverage","test:browser":"karma start --singleRun=true","test:node":"istanbul cover _mocha","upload-coverage":"lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es5"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":0,"max-statements":0}},"dependencies":{},"devDependencies":{"browserify":"^13.0.0","browserify-istanbul":"^1.0.0","coveralls":"2.11.9","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","istanbul":"^0.4.2","karma":"^0.13.22","karma-browserify":"^5.0.2","karma-coverage":"^0.5.5","karma-mocha":"^0.2.2","karma-phantomjs-launcher":"^1.0.0","karma-sauce-launcher":"^0.3.1","lcov-result-merger":"^1.0.2","mocha":"^2.4.5","phantomjs-prebuilt":"^2.1.5","semantic-release":"^4.3.5","simple-assert":"^1.0.0","travis-after-all":"^1.4.4","validate-commit-msg":"^2.3.1"},"engines":{"node":"*"},"version":"1.0.1","gitHead":"d257b8667423de02d1663c814579024ba90c808c","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_id":"check-error@1.0.1","_shasum":"7ba748e678f51cf6b9fb131d41270ac9badb972a","_from":".","_npmVersion":"3.9.5","_nodeVersion":"0.10.45","_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"dist":{"shasum":"7ba748e678f51cf6b9fb131d41270ac9badb972a","size":4987,"noattachment":false,"key":"/check-error/-/check-error-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-1.0.1.tgz"},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/check-error-1.0.1.tgz_1465291333990_0.3948423690162599"},"directories":{},"publish_time":1465291336414,"_cnpm_publish_time":1465291336414,"_hasShrinkwrap":false},"1.0.0":{"name":"check-error","description":"Error comparison and information related utility for node and the browser","keywords":["check-error","error","chai util"],"license":"MIT","author":{"name":"Jake Luer","email":"jake@alogicalparadox.com","url":"http://alogicalparadox.com"},"contributors":[{"name":"David Losert","url":"https://github.com/davelosert"},{"name":"Keith Cirkel","url":"https://github.com/keithamus"},{"name":"Miroslav Bajtoš","url":"https://github.com/bajtos"},{"name":"Lucas Fernandes da Costa","url":"https://github.com/lucasfcosta"}],"files":["index.js","check-error.js"],"main":"./index.js","repository":{"type":"git","url":"git+ssh://git@github.com/chaijs/check-error.git"},"scripts":{"build":"browserify --bare $npm_package_main --standalone checkError -o check-error.js","lint":"eslint --ignore-path .gitignore .","prepublish":"npm run build","semantic-release":"semantic-release pre && npm publish && semantic-release post","pretest":"npm run lint","test":"npm run test:node && npm run test:browser && npm run upload-coverage","test:browser":"karma start --singleRun=true","test:node":"istanbul cover _mocha","upload-coverage":"lcov-result-merger 'coverage/**/lcov.info' | coveralls; exit 0"},"config":{"ghooks":{"commit-msg":"validate-commit-msg"}},"eslintConfig":{"extends":["strict/es5"],"env":{"es6":true},"globals":{"HTMLElement":false},"rules":{"complexity":0,"max-statements":0}},"dependencies":{},"devDependencies":{"browserify":"^13.0.0","browserify-istanbul":"^1.0.0","coveralls":"2.11.9","eslint":"^2.4.0","eslint-config-strict":"^8.5.0","eslint-plugin-filenames":"^0.2.0","ghooks":"^1.0.1","istanbul":"^0.4.2","karma":"^0.13.22","karma-browserify":"^5.0.2","karma-coverage":"^0.5.5","karma-mocha":"^0.2.2","karma-phantomjs-launcher":"^1.0.0","karma-sauce-launcher":"^0.3.1","lcov-result-merger":"^1.0.2","mocha":"^2.4.5","phantomjs-prebuilt":"^2.1.5","semantic-release":"^4.3.5","simple-assert":"^1.0.0","travis-after-all":"^1.4.4","validate-commit-msg":"^2.3.1"},"engines":{"node":"*"},"version":"1.0.0","gitHead":"b61892d74797f418b93817afd9d02b1cf0b10ed9","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"homepage":"https://github.com/chaijs/check-error#readme","_id":"check-error@1.0.0","_shasum":"4ba80ad494b9608e03fc4c33d6aef93d734bdf34","_from":".","_npmVersion":"3.9.5","_nodeVersion":"0.10.45","_npmUser":{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"},"dist":{"shasum":"4ba80ad494b9608e03fc4c33d6aef93d734bdf34","size":4843,"noattachment":false,"key":"/check-error/-/check-error-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/check-error/download/check-error-1.0.0.tgz"},"maintainers":[{"name":"chaijs","email":"chaijs@keithcirkel.co.uk"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/check-error-1.0.0.tgz_1464967937819_0.0839628055691719"},"directories":{},"publish_time":1464967939225,"_cnpm_publish_time":1464967939225,"_hasShrinkwrap":false}},"readme":"<h1 align=center>\n  <a href=\"http://chaijs.com\" title=\"Chai Documentation\">\n    <img alt=\"ChaiJS\" src=\"http://chaijs.com/img/chai-logo.png\">\n  </a>\n  <br>\n  check-error\n</h1>\n\n<p align=center>\n  Error comparison and information related utility for <a href=\"http://nodejs.org\">node</a> and the browser.\n</p>\n\n## What is Check-Error?\n\nCheck-Error is a module which you can use to retrieve an Error's information such as its `message` or `constructor` name and also to check whether two Errors are compatible based on their messages, constructors or even instances.\n\n## Installation\n\n### Node.js\n\n`check-error` is available on [npm](http://npmjs.org). To install it, type:\n\n    $ npm install check-error\n\n### Browsers\n\nYou can also use it within the browser; install via npm and use the `check-error.js` file found within the download. For example:\n\n```html\n<script src=\"./node_modules/check-error/check-error.js\"></script>\n```\n\n## Usage\n\nThe primary export of `check-error` is an object which has the following methods:\n\n* `compatibleInstance(err, errorLike)` - Checks if an error is compatible with another `errorLike` object. If `errorLike` is an error instance we do a strict comparison, otherwise we return `false` by default, because instances of objects can only be compatible if they're both error instances.\n* `compatibleConstructor(err, errorLike)` - Checks if an error's constructor is compatible with another `errorLike` object. If `err` has the same constructor as `errorLike` or if `err` is an instance of `errorLike`.\n* `compatibleMessage(err, errMatcher)` - Checks if an error message is compatible with an `errMatcher` RegExp or String (we check if the message contains the String).\n* `getConstructorName(errorLike)` - Retrieves the name of a constructor, an error's constructor or `errorLike` itself if it's not an error instance or constructor.\n* `getMessage(err)` - Retrieves the message of an error or `err` itself if it's a String. If `err` or `err.message` is undefined we return an empty String.\n\n```js\nvar checkError = require('check-error');\n```\n\n#### .compatibleInstance(err, errorLike)\n\n```js\nvar checkError = require('check-error');\n\nvar funcThatThrows = function() { throw new TypeError('I am a TypeError') };\nvar caughtErr;\n\ntry {\n  funcThatThrows();\n} catch(e) {\n  caughtErr = e;\n}\n\nvar sameInstance = caughtErr;\n\ncheckError.compatibleInstance(caughtErr, sameInstance); // true\ncheckError.compatibleInstance(caughtErr, new TypeError('Another error')); // false\n```\n\n#### .compatibleConstructor(err, errorLike)\n\n```js\nvar checkError = require('check-error');\n\nvar funcThatThrows = function() { throw new TypeError('I am a TypeError') };\nvar caughtErr;\n\ntry {\n  funcThatThrows();\n} catch(e) {\n  caughtErr = e;\n}\n\ncheckError.compatibleConstructor(caughtErr, Error); // true\ncheckError.compatibleConstructor(caughtErr, TypeError); // true\ncheckError.compatibleConstructor(caughtErr, RangeError); // false\n```\n\n#### .compatibleMessage(err, errMatcher)\n\n```js\nvar checkError = require('check-error');\n\nvar funcThatThrows = function() { throw new TypeError('I am a TypeError') };\nvar caughtErr;\n\ntry {\n  funcThatThrows();\n} catch(e) {\n  caughtErr = e;\n}\n\nvar sameInstance = caughtErr;\n\ncheckError.compatibleMessage(caughtErr, /TypeError$/); // true\ncheckError.compatibleMessage(caughtErr, 'I am a'); // true\ncheckError.compatibleMessage(caughtErr, /unicorn/); // false\ncheckError.compatibleMessage(caughtErr, 'I do not exist'); // false\n```\n\n#### .getConstructorName(errorLike)\n\n```js\nvar checkError = require('check-error');\n\nvar funcThatThrows = function() { throw new TypeError('I am a TypeError') };\nvar caughtErr;\n\ntry {\n  funcThatThrows();\n} catch(e) {\n  caughtErr = e;\n}\n\nvar sameInstance = caughtErr;\n\ncheckError.getConstructorName(caughtErr) // 'TypeError'\n```\n\n#### .getMessage(err)\n\n```js\nvar checkError = require('check-error');\n\nvar funcThatThrows = function() { throw new TypeError('I am a TypeError') };\nvar caughtErr;\n\ntry {\n  funcThatThrows();\n} catch(e) {\n  caughtErr = e;\n}\n\nvar sameInstance = caughtErr;\n\ncheckError.getMessage(caughtErr) // 'I am a TypeError'\n```\n","_attachments":{},"homepage":"https://github.com/chaijs/check-error#readme","bugs":{"url":"https://github.com/chaijs/check-error/issues"},"license":"MIT"}