{"name":"component-type","description":"Cross-browser type assertions (less broken typeof)","version":"1.2.2","keywords":["typeof","type","utility"],"dependencies":{},"main":"index.js","license":"MIT","funding":"https://github.com/sponsors/sindresorhus","repository":{"type":"git","url":"git+https://github.com/sindresorhus/component-type.git"},"gitHead":"a581cc14d0b46b8a4c96e2fc99fa76cd7faef5d9","bugs":{"url":"https://github.com/sindresorhus/component-type/issues"},"homepage":"https://github.com/sindresorhus/component-type#readme","_id":"component-type@1.2.2","_nodeVersion":"20.9.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-99VUHREHiN5cLeHm3YLq312p6v+HUEcwtLCAtelvUDI6+SH5g5Cr85oNR2S1o6ywzL0ykMbuwLzM2ANocjEOIA==","shasum":"4458ecc0c1871efc6288bfaff0cbdab08141d079","tarball":"http://registry-npm.ywwl.com/component-type/download/component-type-1.2.2.tgz","fileCount":9,"unpackedSize":119694,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJhrD/S6IuCbhXE43L2lf1egKMTR6su3WTEsZI54VZnAIgOff1J2y+DJ311igW7JYMrJv+/FcKYIK3nQfOLS2chqg="}],"size":27808,"noattachment":false,"key":"/component-type/-/component-type-1.2.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"timaschew","email":"timaschew@gmail.com"},{"name":"anthonyshort","email":"antshort@gmail.com"},{"name":"ianstormtaylor","email":"ian@ianstormtaylor.com"},{"name":"nami-doc","email":"vendethiel@hotmail.fr"},{"name":"clintwood","email":"clint@anotherway.co.za"},{"name":"trevorgerhardt","email":"trevorgerhardt@gmail.com"},{"name":"juliangruber","email":"julian@juliangruber.com"},{"name":"thehydroimpulse","email":"dnfagnan@gmail.com"},{"name":"dominicbarnes","email":"dominic@segment.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"mattmueller","email":"mattmuelle@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"yields","email":"yields@icloud.com"},{"name":"stephenmathieson","email":"me@stephenmathieson.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"},{"name":"timoxley","email":"secoif@gmail.com"},{"name":"jonathanong","email":"jonathanrichardong@gmail.com"},{"name":"jongleberry","email":"jonathanrichardong@gmail.com"},{"name":"maxogden","email":"max@maxogden.com"},{"name":"queckezz","email":"fabian.eichenberger@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/component-type_1.2.2_1700161305577_0.8999440302227528"},"_hasShrinkwrap":false,"readme":"# component-type\n\n> Type assertions aka less-broken `typeof`\n\n## Install\n\n```sh\nnpm install component-type\n```\n\n## Usage\n\n```js\nimport type from 'component-type';\n\nconst date = new Date();\n\nconsole.log(type(date));\n//=> 'date'\n```\n\n## API\n\n```js\ntype(new Date) === 'date'\ntype({}) === 'object'\ntype(null) === 'null'\ntype(undefined) === 'undefined'\ntype('hey') === 'string'\ntype(true) === 'boolean'\ntype(false) === 'boolean'\ntype(12) === 'number'\ntype(type) === 'function'\ntype(/asdf/) === 'regexp'\ntype((function(){ return arguments })()) === 'arguments'\ntype([]) === 'array'\ntype(document.createElement('div')) === 'element'\ntype(NaN) === 'nan'\ntype(new Error('Oh noes')) === 'error'\ntype(new Buffer) === 'buffer'\n```\n\nIt makes no guarantees about the correctness when fed untrusted user-input.\n","publish_time":1700161305746,"_cnpm_publish_time":1700161305746,"dist-tags":{"latest":"2.0.0"}}