{"name":"archive-type","version":"1.0.1","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"https://github.com/kevva/archive-type"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=0.10.0"},"bin":{"archive-type":"cli.js"},"scripts":{"test":"node test/test.js"},"files":["cli.js","index.js"],"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","type"],"dependencies":{"get-stdin":"^2.0.0","is-7zip":"^0.1.0","is-bzip2":"^0.1.0","is-gzip":"^0.1.0","is-rar":"^0.1.0","is-tar":"^0.1.1","is-zip":"^0.1.0","read-chunk":"^1.0.0"},"devDependencies":{"ava":"0.0.4","browserify":"^5.10.0"},"gitHead":"463ce4cf00d208561c8874eae83707578af0fc85","bugs":{"url":"https://github.com/kevva/archive-type/issues"},"homepage":"https://github.com/kevva/archive-type","_id":"archive-type@1.0.1","_shasum":"d3b3ce86f989578c8b6c5038f1327888dde20192","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"dist":{"shasum":"d3b3ce86f989578c8b6c5038f1327888dde20192","tarball":"http://registry-npm.ywwl.com/archive-type/download/archive-type-1.0.1.tgz","integrity":"sha512-Ghsh3Fj6ANJc7q7cjx4wxztocYMWjasT4QiPG1ok6U6iHw8+oIPo+x4D9UIyRHtCXA9RYrDyIf/9HPxgmoTTVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1yTJuHVcammiFMxJ/kSGLpQtOyXkmVr9mNBtrFRfdxwIgN/mNAg1AtIqkfFNoC1t8b0pDc3ymEhASULzJqLWbQYc="}],"size":1536,"noattachment":false,"key":"/archive-type/-/archive-type-1.0.1.tgz"},"directories":{},"readme":"# archive-type [![Build Status](https://travis-ci.org/kevva/archive-type.svg?branch=master)](https://travis-ci.org/kevva/archive-type)\n\n> Detect the archive type of a Buffer/Uint8Array\n\n\n## Install\n\n```\n$ npm install --save archive-type\n```\n\n\n## Usage\n\n```js\nconst archiveType = require('archive-type');\nconst readChunk = require('read-chunk');\nconst buffer = readChunk.sync('unicorn.zip', 0, 262);\n\narchiveType(buffer);\n//=> {ext: 'zip', mime: 'application/zip'}\n```\n\n\n## API\n\n### archiveType(input)\n\nReturns an `Object` with:\n\n- `ext` - One of the [supported file types](#supported-file-types)\n- `mime` - The [MIME type](http://en.wikipedia.org/wiki/Internet_media_type)\n\nOr `null` when no match.\n\n#### input\n\nType: `Buffer` `Uint8Array`\n\nIt only needs the first 262 bytes.\n\n\n## Supported file types\n\n- `7z`\n- `bz2`\n- `gz`\n- `rar`\n- `tar`\n- `zip`\n- `xz`\n- `gz`\n\n\n## Related\n\n- [archive-type-cli](https://github.com/kevva/archive-type-cli) - CLI for this module\n\n\n## License\n\nMIT © [Kevin Mårtensson](https://github.com/kevva)\n","publish_time":1408545743955,"_cnpm_publish_time":1408545743955,"dist-tags":{"latest":"4.0.0"}}