{"_id":"inspect-with-kind","_rev":"30906","name":"inspect-with-kind","description":"`util.inspect` with additional type information","dist-tags":{"latest":"1.0.5"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"time":{"modified":"2021-06-03T10:05:03.000Z","created":"2017-03-08T12:29:57.231Z","1.0.5":"2018-08-28T02:30:03.073Z","1.0.4":"2017-12-13T03:36:53.362Z","1.0.3":"2017-10-17T10:53:32.260Z","1.0.2":"2017-06-26T06:38:53.056Z","1.0.1":"2017-05-22T07:31:18.287Z","1.0.0":"2017-03-09T07:09:15.277Z","0.0.0":"2017-03-08T12:29:57.231Z"},"users":{},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"versions":{"1.0.5":{"name":"inspect-with-kind","version":"1.0.5","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"license":"ISC","scripts":{"pretest":"eslint .","test":"nyc --reporter=html --reporter=text node test.js"},"files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^6.0.2"},"devDependencies":{"@shinnn/eslint-config-node":"^6.0.0","babel-eslint":"^9.0.0","eslint":"^5.4.0","nyc":"^13.0.1","tape":"^4.9.1","zen-observable":"^0.8.9"},"eslintConfig":{"extends":"@shinnn/node","parser":"babel-eslint"},"gitHead":"a20ebf53e8dba372c3e51fcb35c5e8269c12d50a","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@1.0.5","_npmVersion":"6.4.0","_nodeVersion":"10.9.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"fce151d4ce89722c82ca8e9860bb96f9167c316c","size":2326,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-1.0.5.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-with-kind_1.0.5_1535423402989_0.09815055460492772"},"_hasShrinkwrap":false,"publish_time":1535423403073,"_cnpm_publish_time":1535423403073},"1.0.4":{"name":"inspect-with-kind","version":"1.0.4","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --fix --format=codeframe index.js test.js","test":"nyc node --throw-deprecation test.js"},"license":"ISC","files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^6.0.2"},"devDependencies":{"@shinnn/eslint-config-node":"^5.0.0","eslint":"^4.13.1","nyc":"^11.4.0","tape":"^4.8.0","zen-observable":"^0.6.0"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"290a96f129586f3b206dc87be5e0c258b46341c8","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@1.0.4","_npmVersion":"5.6.0","_nodeVersion":"9.2.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"4b325d5bf7ef8a6e186791795181c52fc9c5af01","size":2301,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-1.0.4.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-with-kind-1.0.4.tgz_1513136213228_0.5112941260449588"},"directories":{},"publish_time":1513136213362,"_hasShrinkwrap":false,"_cnpm_publish_time":1513136213362},"1.0.3":{"name":"inspect-with-kind","version":"1.0.3","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --format=codeframe index.js test.js","test":"nyc node --throw-deprecation test.js"},"license":"ISC","files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^6.0.0"},"devDependencies":{"@shinnn/eslint-config-node":"^4.0.2","eslint":"^4.9.0","nyc":"^11.2.1","tape":"^4.8.0","zen-observable":"^0.6.0"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"fe1b1f7e9c2be2a6f085eccc20f4abcdadc92514","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@1.0.3","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"d8db6de617eb2f7223adb7f6f4db4f5e81fd538f","size":2323,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-1.0.3.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-with-kind-1.0.3.tgz_1508237612115_0.18288412201218307"},"directories":{},"publish_time":1508237612260,"_hasShrinkwrap":false,"_cnpm_publish_time":1508237612260},"1.0.2":{"name":"inspect-with-kind","version":"1.0.2","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --format=codeframe index.js test.js","test":"nyc node --throw-deprecation test.js"},"license":"MIT","files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^5.0.0"},"devDependencies":{"@shinnn/eslint-config-node":"^4.0.0","eslint":"^4.1.1","nyc":"^11.0.2","tape":"^4.6.3","zen-observable":"^0.5.2"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"9ef20cab9cbaca7a8967a240f7121c5ab0ed60f8","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@1.0.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"40371e74c7fbb2c10a24cc22684f55878bfb6d92","size":2517,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-1.0.2.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-with-kind-1.0.2.tgz_1498459132949_0.622806126717478"},"directories":{},"publish_time":1498459133056,"_hasShrinkwrap":false,"_cnpm_publish_time":1498459133056},"1.0.1":{"name":"inspect-with-kind","version":"1.0.1","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --fix --format=codeframe index.js test.js","test":"nyc node --throw-deprecation test.js"},"license":"MIT","files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^4.0.0"},"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.19.0","nyc":"^10.3.2","tape":"^4.6.3","zen-observable":"^0.5.1"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"52da928b63a7df0f7ffaf04b0b4a5a991489fc58","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@1.0.1","_shasum":"948449b3c177ee6addf3b2d0a9635baf5a285da3","_from":".","_npmVersion":"4.6.1","_nodeVersion":"7.10.0","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"948449b3c177ee6addf3b2d0a9635baf5a285da3","size":2522,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-1.0.1.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/inspect-with-kind-1.0.1.tgz_1495438278174_0.7240728524047881"},"directories":{},"publish_time":1495438278287,"_cnpm_publish_time":1495438278287,"_hasShrinkwrap":false},"1.0.0":{"name":"inspect-with-kind","version":"1.0.0","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --fix --format=codeframe index.js test.js","test":"nyc node --throw-deprecation test.js"},"license":"MIT","files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^3.1.0"},"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.17.1","nyc":"^10.1.2","tape":"^4.6.3","zen-observable":"^0.5.0"},"eslintConfig":{"extends":"@shinnn/node"},"gitHead":"2e92c767363b66e11dd2b4714b9089f051877718","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@1.0.0","_shasum":"0cd47528a9b2529883ad961a975b7daa49aec655","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.7.2","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"0cd47528a9b2529883ad961a975b7daa49aec655","size":2521,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-1.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/inspect-with-kind-1.0.0.tgz_1489043353457_0.49402170325629413"},"directories":{},"publish_time":1489043355277,"_cnpm_publish_time":1489043355277,"_hasShrinkwrap":false},"0.0.0":{"name":"inspect-with-kind","version":"0.0.0","description":"`util.inspect` with additional type information","repository":{"type":"git","url":"git+https://github.com/shinnn/inspect-with-kind.git"},"author":{"name":"Shinnosuke Watanabe","url":"https://github.com/shinnn"},"scripts":{"pretest":"eslint --fix --format=codeframe index.js test.js","test":"nyc node --throw-deprecation test.js"},"license":"MIT","files":["index.js"],"keywords":["inspect","format","beautify","clarify","stringify","type","kind","append","additional","info","check"],"dependencies":{"kind-of":"^3.1.0"},"devDependencies":{"@shinnn/eslint-config-node":"^3.0.0","eslint":"^3.17.1","nyc":"^10.1.2","tape":"^4.6.3","zen-observable":"^0.4.0"},"eslintConfig":{"extends":"@shinnn/node"},"bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","_id":"inspect-with-kind@0.0.0","_shasum":"381ae3df849251df41aa87550912ad1f49e34ed4","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.7.1","_npmUser":{"name":"shinnn","email":"snnskwtnb@gmail.com"},"dist":{"shasum":"381ae3df849251df41aa87550912ad1f49e34ed4","size":2526,"noattachment":false,"key":"/inspect-with-kind/-/inspect-with-kind-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/inspect-with-kind/download/inspect-with-kind-0.0.0.tgz"},"maintainers":[{"name":"shinnn","email":"snnskwtnb@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/inspect-with-kind-0.0.0.tgz_1488976195364_0.49791808519512415"},"directories":{},"publish_time":1488976197231,"_cnpm_publish_time":1488976197231,"_hasShrinkwrap":false}},"readme":"# inspect-with-kind\n\n[![npm version](https://img.shields.io/npm/v/inspect-with-kind.svg)](https://www.npmjs.com/package/inspect-with-kind)\n[![Build Status](https://travis-ci.org/shinnn/inspect-with-kind.svg?branch=master)](https://travis-ci.org/shinnn/inspect-with-kind)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/inspect-with-kind.svg)](https://coveralls.io/github/shinnn/inspect-with-kind?branch=master)\n\n[`util.inspect`][util.inspect] with additional type information\n\n```javascript\nconst {inspect} = require('util');\nconst inspectWithKind = require('inspect-with-kind');\n\ninspect([1, 2, 3]); //=> '[ 1, 2, 3 ]'\ninspectWithKind([1, 2, 3]); //=> '[ 1, 2, 3 ] (array)'\n```\n\n## Installation\n\n[Use npm.](https://docs.npmjs.com/cli/install)\n\n```\nnpm install inspect-with-kind\n```\n\n## API\n\n```javascript\nconst inspectWithKind = require('inspect-with-kind');\n```\n\n### inspectWithKind(*value* [, *options*])\n\n*value*: any type  \n*options*: `Object` ([`util.inspect`][util.inspect] options)  \nReturn: `string`\n\nAlmost the same as `util.inspect`, but:\n\n* It appends a type information to the string if the first argument is one of `boolean`, `string`, `number`, `bigint`, `Array`, `RegExp`, `Date`, `arguments` or a plain `Object`.\n* Error stack trace is omitted.\n* `breakLength` option defaults to `Infinity`.\n* `maxArrayLength` option defaults to `10`.\n\n```javascript\nconst util = require('util');\nconst inspectWithKind = require('inspect-with-kind');\n\n// appends type info\nutil.inspect(1); //=> '1'\ninspectWithKind(1); //=> '1 (number)'\nutil.inspect('1'); //=> '\\'1\\''\ninspectWithKind('1'); //=> '\\'1\\' (string)'\n\n// doesn't appends type info, because <Buffer ...> clearly expresses what it is\nutil.inspect(Buffer.from('1')); //=> '<Buffer 31>'\ninspectWithKind(Buffer.from('1')); //=> '<Buffer 31>'\n\n// omits stack trace\nutil.inspect(new Error('error!')); //=> 'Error: error!\\n    at repl:1:14\\n    at ContextifyScript ...'\ninspectWithKind(new Error('error!')); //=> 'Error: error!'\n```\n\n## Example\n\nThis module is useful for making `TypeError` error messages in your Node.js library.\n\n```javascript\nconst inspectWithKind = require('inspect-with-kind');\n\nmodule.exports = function reverse(v) {\n  if (typeof v !== 'boolean') {\n    throw new TypeError(`Expected a Boolean value, but got ${inspectWithKind(v)}.`);\n  }\n\n  return !v;\n};\n```\n\n```javascript\nconst reverse = require('./reverse.js');\n\nreverse(/true/); // TypeError: Expected a Boolean value, but got /true/ (regexp).\n```\n\n## License\n\n[ISC License](./LICENSE) © 2017 Shinnosuke Watanabe\n\n[util.inspect]: https://nodejs.org/api/util.html#util_util_inspect_object_options\n","_attachments":{},"homepage":"https://github.com/shinnn/inspect-with-kind#readme","bugs":{"url":"https://github.com/shinnn/inspect-with-kind/issues"},"license":"ISC"}