{"_id":"buffer-type","_rev":"13-4f283ba1b35f2204b14ace42b21cef6a","name":"buffer-type","description":"Detect content-type from Buffer data.","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"buffer-type","version":"0.0.1","description":"Detect content-type from Buffer data.","main":"index.js","scripts":{"test":"make test-all"},"dependencies":{},"devDependencies":{"should":"*","blanket":"*","travis-cov":"*","coveralls":"*","mocha-lcov-reporter":"*","mime":"*","mocha":"*"},"repository":{"type":"git","url":"git://github.com/fengmk2/buffer-type.git","web":"https://github.com/fengmk2/buffer-type"},"keywords":["buffer-type","content-type","buffer","type","filetype","file extension","buffer type"],"engines":{"node":">= 0.8.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/fengmk2/buffer-type/issues"},"_id":"buffer-type@0.0.1","dist":{"shasum":"368f99227306d2001f22a048639e9e8655e5f827","tarball":"https://registry.npmjs.org/buffer-type/-/buffer-type-0.0.1.tgz","integrity":"sha512-MWsRGn1FVrd1VhNzRHWmx9wXQEmr6IolbU0LKdWIwsysYSyyk6+OpN4UjQTd8dkYaOxNoz4COTjHWjdoAPNyag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNMn4W/wkOggxDWCKkwSPCD/4aw4Y2aEdX80GFnc1cngIgam9nm/2sKH2Lp3naREetXyvpeD1G635ou28wWTW3jQ8="}]},"_from":".","_npmVersion":"1.3.5","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{}},"0.0.2":{"name":"buffer-type","version":"0.0.2","description":"Detect content-type from Buffer data.","main":"index.js","scripts":{"test":"make test-all"},"config":{"blanket":{"pattern":"buffer-type/lib","data-cover-flags":{"debug":false}},"travis-cov":{"threshold":100}},"dependencies":{},"devDependencies":{"should":"*","blanket":"*","travis-cov":"*","coveralls":"*","mocha-lcov-reporter":"*","mime":"*","mocha":"*"},"homepage":"https://github.com/node-modules/buffer-type","repository":{"type":"git","url":"git://github.com/node-modules/buffer-type.git","web":"https://github.com/node-modules/buffer-type"},"keywords":["buffer-type","image-type","content-type","buffer","type","mime","filetype","file extension","buffer type"],"engines":{"node":">= 0.8.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/node-modules/buffer-type/issues"},"_id":"buffer-type@0.0.2","dist":{"shasum":"8a0bbcbe786049af8b436a636b9b50525fe26ca3","tarball":"https://registry.npmjs.org/buffer-type/-/buffer-type-0.0.2.tgz","integrity":"sha512-m5sF9dz7O9pa9xgLMPlOBTW3wHCpnzyr2Wj4Lf0WJnxSCVUo4WIYUbfPxEM2PhlTzOXf9GSkvCVcLYWDWmsFgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg1KmZsCqgNmu2Eg+fZXraGiCDn6x1jsnyoajeF//oRgIhAIHvtvahVbdv9qSK5zn28E8OeYiVxhUZbXXVwX6VCGNB"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{}},"1.0.0":{"name":"buffer-type","version":"1.0.0","description":"Detect content-type from Buffer data.","main":"lib/buffer-type.js","files":["lib"],"scripts":{"lint":"eslint lib test","test-local":"egg-bin test","test":"npm run lint && npm run test-local","ci":"npm run lint && egg-bin cov"},"dependencies":{},"devDependencies":{"egg-bin":"^4.7.0","egg-ci":"^1.8.0","eslint":"^5.0.1","eslint-config-egg":"^7.0.0","mime":"1"},"homepage":"https://github.com/node-modules/buffer-type","repository":{"type":"git","url":"git://github.com/node-modules/buffer-type.git"},"keywords":["buffer-type","image-type","content-type","buffer","type","mime","filetype","file extension","buffer type"],"engines":{"node":">= 8.0.0"},"ci":{"version":"8, 10"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","gitHead":"0973d766a9f66c04d61b47746b789a294c9af968","bugs":{"url":"https://github.com/node-modules/buffer-type/issues"},"_id":"buffer-type@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.4.0","_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"dist":{"integrity":"sha512-N6bvq1lldG40grSAsoWnmi/SfxuwUwS2lfEqsjMXboeGdb88CuIKHQN1Z72l05CUiwwAaHWXF0oTYLdpWugUIA==","shasum":"0ed6f61f9ca8b4f5d55c24a9d835228176d7602b","tarball":"https://registry.npmjs.org/buffer-type/-/buffer-type-1.0.0.tgz","fileCount":5,"unpackedSize":20318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbNNFyCRA9TVsSAnZWagAA5vQP/2+FnJYSxcz6YeQo7YbL\nl4Aqc/CaB1RhyUtGf23095Pwo+LRIf/aUL7ssxgk3ty613aIV3+xFoH7HKfy\n0yvmKBflRickidjbAnMketC5kYgFTjSwi7K08jxwWNd/MRR/1JyLnF5JP5jb\nyC/YRRRjkOWPKPeXdybkc6CizZa4lYe3yktUE1oqjh1noQiOoEuEmzyuCuKV\n2zxg53SXiMDgtbXlMsULtEiG6tHraZdBRwHDEhjHlFjAhtCnrO+hzLGFJm4q\nsM5QB595mZa8+96qfi2Paws8hDSCT5caasMFzrZ2r68p9neKdwAFb7sOifIC\nzk46cKHb6UX9XW+abEfyf1Zql8fH7Ax2owPH7UG1SZAa1AdZNXkze9+c/Dtb\nLyX4bC8z+guQJWPjnrurVwfjNdbQuqwhUNuPE917y9H+Q7M2N5j+l2KipsE+\nGrAZCkoPSByaeLFqrH1wJoH1S8sceMvNLd5cPgyi/BbajTcI//cF9tZFIK6I\n+tQCbtdGQ7oZzmzwuXqF9IRPhzRg1UkJT1603CoItxQ87svOudzcnUzEQDFL\nHsTP/58DJicraCQM9WfHCyRwwsfKnW3wnaoReKbMCrq+cql7r8iB/R67U4lr\nyrcpzTxXFVinV5TAuY/pr2AeXs2TLHWlBACwV16AABA85giAFB3JY5k/vLDV\nVTbo\r\n=N8ZD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkrL46yMc1KJ6nsndMY76l0s/5ImDaqlYGvTdpyBKa5wIhAIstjlErrInFoNi/NlMbp2Kxkr3WYTVsQsHSIH1ER3x7"}]},"maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/buffer-type_1.0.0_1530188146010_0.0718839759230292"},"_hasShrinkwrap":false}},"readme":"buffer-type\n=======\n\n[![NPM version][npm-image]][npm-url]\n[![NPM quality][quality-image]][quality-url]\n[![build status][travis-image]][travis-url]\n[![Test coverage][codecov-image]][codecov-url]\n[![David deps][david-image]][david-url]\n[![Known Vulnerabilities][snyk-image]][snyk-url]\n[![NPM download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/buffer-type.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/buffer-type\n[quality-image]: http://npm.packagequality.com/shield/buffer-type.svg?style=flat-square\n[quality-url]: http://packagequality.com/#?package=buffer-type\n[travis-image]: https://img.shields.io/travis/node-modules/buffer-type.svg?style=flat-square\n[travis-url]: https://travis-ci.org/node-modules/buffer-type\n[codecov-image]: https://img.shields.io/codecov/c/github/node-modules/buffer-type.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/node-modules/buffer-type\n[david-image]: https://img.shields.io/david/node-modules/buffer-type.svg?style=flat-square\n[david-url]: https://david-dm.org/node-modules/buffer-type\n[snyk-image]: https://snyk.io/test/npm/buffer-type/badge.svg?style=flat-square\n[snyk-url]: https://snyk.io/test/npm/buffer-type\n[download-image]: https://img.shields.io/npm/dm/buffer-type.svg?style=flat-square\n[download-url]: https://npmjs.org/package/buffer-type\n\nDetect content-type from Buffer data.\n\n## Install\n\n```bash\n$ npm install buffer-type\n```\n\n## Usage\n\n```js\nconst bt = require('buffer-type');\nconst fs = require('fs');\n\nconst info = bt(fs.readFileSync(__dirname + '/logo.png'));\nconsole.log(info);\n// {\n//   type: 'image/png',\n//    extension: '.png',\n//    width: 618,\n//    height: 96,\n//    bit: 8, // bit depth\n//    color: 6,\n//    compression: 0,\n//    filter: 0,\n//    interlace: 0\n// }\n```\n\n## References\n\n* http://www.onicos.com/staff/iz/formats/\n* http://www.fastgraph.com/help/image_file_header_formats.html\n* http://en.wikipedia.org/wiki/Portable_Network_Graphics\n* http://en.wikipedia.org/wiki/Image_file_format\n\n## TODO\n\n* Image\n  * [√] .png\n  * [√] .jpg\n  * [√] .bmp\n  * [√] .gif\n  * [√] .webp\n  * [ ] .svg\n  * [ ] .tif\n  * [ ] .psd\n* Tar\n  * [ ] .tar\n  * [ ] .gzip\n  * [ ] .zip\n  * [ ] .rar\n* PE file\n  * [ ] .exe\n  * [ ] .msi\n  * [ ] .apk\n  * [ ] .ipa\n* Text\n  * [ ] .xml\n  * [ ] .html\n  * [ ] .json\n* Media\n  * [ ] .mp3\n  * [ ] .mp4\n  * [ ] .avi\n\n## License\n\n[MIT](LICENSE.txt)\n","maintainers":[{"name":"fengmk2","email":"fengmk2@gmail.com"}],"time":{"modified":"2022-06-13T05:15:29.535Z","created":"2013-08-12T10:07:25.883Z","0.0.0":"2013-08-12T10:07:30.655Z","0.0.1":"2013-08-14T02:19:58.404Z","0.0.2":"2014-05-04T07:02:35.142Z","1.0.0":"2018-06-28T12:15:46.108Z"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"type":"git","url":"git://github.com/node-modules/buffer-type.git"},"homepage":"https://github.com/node-modules/buffer-type","keywords":["buffer-type","image-type","content-type","buffer","type","mime","filetype","file extension","buffer type"],"bugs":{"url":"https://github.com/node-modules/buffer-type/issues"},"license":"MIT","readmeFilename":"README.md"}