{"_id":"is-typeof-error","_rev":"2764817","name":"is-typeof-error","description":"Check that given value is any type of error and instanceof Error.","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"time":{"modified":"2022-04-02T08:53:50.000Z","created":"2015-06-30T15:41:17.318Z","1.1.0":"2016-02-15T01:34:48.240Z","1.0.1":"2015-07-13T20:40:45.390Z","1.0.0":"2015-06-30T16:40:25.000Z","0.0.0":"2015-06-30T15:41:17.318Z"},"users":{},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"repository":{"type":"git","url":"git+https://github.com/tunnckocore/is-typeof-error.git"},"versions":{"1.1.0":{"name":"is-typeof-error","version":"1.1.0","description":"Check that given value is any type of error and instanceof Error.","repository":{"type":"git","url":"git+https://github.com/tunnckocore/is-typeof-error.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"precommit.silent":true,"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-extendable":"^0.1.1"},"devDependencies":{"assertit":"^0.1.0","kind-error":"^2.0.0","plugin-error":"^0.1.2","pre-commit":"*"},"files":["index.js"],"keywords":["is-typeof-error"],"verb":{"toc":false,"layout":"empty","tasks":["readme"],"related":{"list":["error-base","is-kindof","kind-error","kind-of","kind-of-extra","kind-of-types"]}},"gitHead":"c8a94b79765dda0147e3bba13173d2112599c2f4","bugs":{"url":"https://github.com/tunnckocore/is-typeof-error/issues"},"homepage":"https://github.com/tunnckocore/is-typeof-error#readme","_id":"is-typeof-error@1.1.0","_shasum":"f824e241342c0678b09d697e8041aeb4f4fa281c","_from":".","_npmVersion":"3.7.1","_nodeVersion":"5.6.0","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"dist":{"shasum":"f824e241342c0678b09d697e8041aeb4f4fa281c","size":3351,"noattachment":false,"key":"/is-typeof-error/-/is-typeof-error-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-typeof-error/download/is-typeof-error-1.1.0.tgz"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/is-typeof-error-1.1.0.tgz_1455500086160_0.286675525829196"},"directories":{},"publish_time":1455500088240,"_hasShrinkwrap":false,"_cnpm_publish_time":1455500088240,"_cnpmcore_publish_time":"2021-12-16T22:32:59.721Z"},"1.0.1":{"name":"is-typeof-error","version":"1.0.1","description":"Check that given value is any type of error and instanceof Error","repository":{"type":"git","url":"git+https://github.com/tunnckocore/is-typeof-error.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"is-extendable":"~0.1.1"},"devDependencies":{"assertit":"^0.1.0","kind-error":"^1.0.0","plugin-error":"^0.1.2"},"keywords":["any","check","error","instance","instanceof","is","kind","kindof","tool","type","typeof","util","validate"],"gitHead":"6f77a2e662b3bc8c6767aef0e58381af99cee9c9","bugs":{"url":"https://github.com/tunnckocore/is-typeof-error/issues"},"homepage":"https://github.com/tunnckocore/is-typeof-error#readme","_id":"is-typeof-error@1.0.1","_shasum":"8c2d1a8f8ab55b0342f19e4b57621aaced656b35","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"8c2d1a8f8ab55b0342f19e4b57621aaced656b35","size":4454,"noattachment":false,"key":"/is-typeof-error/-/is-typeof-error-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-typeof-error/download/is-typeof-error-1.0.1.tgz"},"directories":{},"publish_time":1436820045390,"_hasShrinkwrap":false,"_cnpm_publish_time":1436820045390,"_cnpmcore_publish_time":"2021-12-16T22:32:59.949Z"},"1.0.0":{"name":"is-typeof-error","version":"1.0.0","description":"Check that given value is any type of error and instanceof Error","repository":{"type":"git","url":"git+https://github.com/tunnckocore/is-typeof-error.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"isobject":"~1.0.0"},"devDependencies":{"assertit":"^0.1.0","kind-error":"^1.0.0","plugin-error":"^0.1.2"},"keywords":["any","check","error","instance","instanceof","is","kind","kindof","tool","type","typeof","util","validate"],"gitHead":"d3a9d20274c592f299a66c9a9d92a40f96e4c88b","bugs":{"url":"https://github.com/tunnckocore/is-typeof-error/issues"},"homepage":"https://github.com/tunnckocore/is-typeof-error#readme","_id":"is-typeof-error@1.0.0","_shasum":"b1e84b41eb95ec7eecc74ef237db41c2aa35d177","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"b1e84b41eb95ec7eecc74ef237db41c2aa35d177","size":4038,"noattachment":false,"key":"/is-typeof-error/-/is-typeof-error-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-typeof-error/download/is-typeof-error-1.0.0.tgz"},"directories":{},"publish_time":1435682425000,"_hasShrinkwrap":false,"_cnpm_publish_time":1435682425000,"_cnpmcore_publish_time":"2021-12-16T22:33:00.158Z"},"0.0.0":{"name":"is-typeof-error","version":"0.0.0","description":"Check that given value is any type of error and instanceof Error","repository":{"type":"git","url":"git+https://github.com/tunnckocore/is-typeof-error.git"},"author":{"name":"Charlike Mike Reagent","email":"@tunnckoCore","url":"http://www.tunnckocore.tk"},"main":"index.js","license":"MIT","scripts":{"test":"standard && node test.js"},"dependencies":{"isobject":"^1.0.0"},"devDependencies":{"assertit":"^0.1.0"},"keywords":[],"bugs":{"url":"https://github.com/tunnckocore/is-typeof-error/issues"},"homepage":"https://github.com/tunnckocore/is-typeof-error#readme","_id":"is-typeof-error@0.0.0","_shasum":"bd0742a2ad5f2520d94862f1668099c8029a16cb","_from":".","_npmVersion":"2.11.0","_nodeVersion":"2.2.1","_npmUser":{"name":"tunnckocore","email":"mameto_100@mail.bg"},"maintainers":[{"name":"tunnckocore","email":"mameto_100@mail.bg"},{"name":"vanchoy","email":"super.ludiq@gmail.com"}],"dist":{"shasum":"bd0742a2ad5f2520d94862f1668099c8029a16cb","size":3556,"noattachment":false,"key":"/is-typeof-error/-/is-typeof-error-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-typeof-error/download/is-typeof-error-0.0.0.tgz"},"directories":{},"publish_time":1435678877318,"_hasShrinkwrap":false,"_cnpm_publish_time":1435678877318,"_cnpmcore_publish_time":"2021-12-16T22:33:00.383Z"}},"readme":"# [is-typeof-error][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] \n\n> Check that given value is any type of error and instanceof Error.\n\n[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url]\n\n## Install\n```\nnpm i is-typeof-error --save\n```\n\n## Usage\n> For more use-cases see the [tests](./test.js)\n\n```js\nconst isTypeofError = require('is-typeof-error')\n```\n\n### [isTypeofError](index.js#L43)\n> Check that `val` is error.\n\n**Params**\n\n* `val` **{Error}**    \n* `returns` **{Boolean}**  \n\n**Example**\n\n```js\nconst isTypeofError = require('is-typeof-error')\nconst PluginError = require('plugin-error')\nconst KindError = require('kind-error')\n\nconst CustomClass = function () {}\nCustomClass.prototype.foo = function () {}\n\nisTypeofError(new TypeError('test'))           // => true\nisTypeofError(new KindError('test'))           // => true\nisTypeofError(new SyntaxError('test'))         // => true\nisTypeofError(new PluginError('test', 'msg'))  // => true\n\nisTypeofError(new CustomClass('test'))         // => false\nisTypeofError(new Object({a: 'b'}))            // => false\nisTypeofError(new RegExp('test'))              // => false\nisTypeofError(Object.create({a: 'b'}))         // => false\nisTypeofError(/regex/)                         // => false\nisTypeofError({a: 'b'})                        // => false\n```\n\n## Related\n* [error-base](https://www.npmjs.com/package/error-base): Create custom Error classes. | [homepage](https://github.com/doowb/error-base)\n* [is-kindof](https://www.npmjs.com/package/is-kindof): Check type of given javascript value. Support promises, generators, streams, and native types… [more](https://www.npmjs.com/package/is-kindof) | [homepage](https://github.com/tunnckocore/is-kindof)\n* [kind-error](https://www.npmjs.com/package/kind-error): Base class for easily creating meaningful and quiet by default Error classes with sane… [more](https://www.npmjs.com/package/kind-error) | [homepage](https://github.com/tunnckocore/kind-error)\n* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of)\n* [kind-of-extra](https://www.npmjs.com/package/kind-of-extra): Additional functionality to `kind-of` type check utility, support promises, generators… [more](https://www.npmjs.com/package/kind-of-extra) | [homepage](https://github.com/tunnckocore/kind-of-extra)\n* [kind-of-types](https://www.npmjs.com/package/kind-of-types): List of all javascript types. Used and useful for checking, validation, sanitizing and… [more](https://www.npmjs.com/package/kind-of-types) | [homepage](https://github.com/tunnckocore/kind-of-types)\n\n## Contributing\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/is-typeof-error/issues/new).  \nBut before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines.\n\n## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url]\n\n[![tunnckoCore.tk][author-www-img]][author-www-url] [![keybase tunnckoCore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]\n\n[npmjs-url]: https://www.npmjs.com/package/is-typeof-error\n[npmjs-img]: https://img.shields.io/npm/v/is-typeof-error.svg?label=is-typeof-error\n\n[license-url]: https://github.com/tunnckoCore/is-typeof-error/blob/master/LICENSE\n[license-img]: https://img.shields.io/badge/license-MIT-blue.svg\n\n[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/is-typeof-error\n[codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/is-typeof-error.svg\n\n[travis-url]: https://travis-ci.org/tunnckoCore/is-typeof-error\n[travis-img]: https://img.shields.io/travis/tunnckoCore/is-typeof-error.svg\n\n[coveralls-url]: https://coveralls.io/r/tunnckoCore/is-typeof-error\n[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/is-typeof-error.svg\n\n[david-url]: https://david-dm.org/tunnckoCore/is-typeof-error\n[david-img]: https://img.shields.io/david/tunnckoCore/is-typeof-error.svg\n\n[standard-url]: https://github.com/feross/standard\n[standard-img]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg\n\n[author-www-url]: http://www.tunnckoCore.tk\n[author-www-img]: https://img.shields.io/badge/www-tunnckoCore.tk-fe7d37.svg\n\n[keybase-url]: https://keybase.io/tunnckocore\n[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg\n\n[author-npm-url]: https://www.npmjs.com/~tunnckocore\n[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg\n\n[author-twitter-url]: https://twitter.com/tunnckoCore\n[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg\n\n[author-github-url]: https://github.com/tunnckoCore\n[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg\n\n[freenode-url]: http://webchat.freenode.net/?channels=charlike\n[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg\n\n[new-message-url]: https://github.com/tunnckoCore/ama\n[new-message-img]: https://img.shields.io/badge/ask%20me-anything-green.svg\n\n","_attachments":{},"homepage":"https://github.com/tunnckocore/is-typeof-error#readme","bugs":{"url":"https://github.com/tunnckocore/is-typeof-error/issues"},"license":"MIT"}