{"name":"archive-type","version":"4.0.0","description":"Detect the archive type of a Buffer/Uint8Array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/archive-type.git"},"author":{"name":"Kevin Mårtensson","email":"kevinmartensson@gmail.com","url":"https://github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["7zip","archive","buffer","bz2","bzip2","check","detect","gz","gzip","mime","rar","zip","file","type"],"dependencies":{"file-type":"^4.2.0"},"devDependencies":{"ava":"*","pify":"^2.3.0","xo":"*"},"gitHead":"b4d84d12b3a3a4d934c884aef89dccf2b6aaa1c9","bugs":{"url":"https://github.com/kevva/archive-type/issues"},"homepage":"https://github.com/kevva/archive-type#readme","_id":"archive-type@4.0.0","_shasum":"f92e72233056dfc6969472749c267bdb046b1d70","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f92e72233056dfc6969472749c267bdb046b1d70","tarball":"http://registry-npm.ywwl.com/archive-type/download/archive-type-4.0.0.tgz","integrity":"sha512-zV4Ky0v1F8dBrdYElwTvQhweQ0P7Kwc1aluqJsYtOBP01jXcWCyW2IEfI1YiqsG+Iy7ZR+o5LF1N+PGECBxHWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDY/D3wcsskiztp1zuGQew5hyVmjrYmkOEIshbHgmSryAiBqE/8rJkwlR9M8IQlTIGj4SMmy5b2xkIhX4KI+mkLrXQ=="}],"size":1814,"noattachment":false,"key":"/archive-type/-/archive-type-4.0.0.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"},{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/archive-type-4.0.0.tgz_1493125986617_0.39786559878848493"},"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":1493125986845,"_cnpm_publish_time":1493125986845,"dist-tags":{"latest":"4.0.0"}}