Socket
Socket
Sign inDemoInstall

archive-type

Package Overview
Dependencies
1
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.0 to 3.2.0

3

index.js

@@ -13,3 +13,4 @@ 'use strict';

'zip',
'xz'
'xz',
'gz'
];

@@ -16,0 +17,0 @@

{
"name": "archive-type",
"version": "3.1.0",
"version": "3.2.0",
"description": "Detect the archive type of a Buffer/Uint8Array",

@@ -41,3 +41,8 @@ "license": "MIT",

"ava": "^0.0.4"
},
"xo": {
"rules": {
"no-negated-condition": 0
}
}
}

@@ -18,6 +18,6 @@ # archive-type [![Build Status](https://travis-ci.org/kevva/archive-type.svg?branch=master)](https://travis-ci.org/kevva/archive-type)

```js
var read = require('fs').readFileSync;
var readFileSync = require('fs').readFileSync;
var archiveType = require('archive-type');
archiveType(read('foo.zip'));
archiveType(readFileSync('foo.zip'));
//=> {ext: 'zip', mime: 'application/zip'}

@@ -31,3 +31,3 @@ ```

Returns [`7z`](https://github.com/kevva/is-7zip), [`bz2`](https://github.com/kevva/is-bzip2), [`gz`](https://github.com/kevva/is-gzip), [`rar`](https://github.com/kevva/is-rar), [`tar`](https://github.com/kevva/is-tar), [`zip`](https://github.com/kevva/is-zip) or `false`.
Returns [`7z`](https://github.com/kevva/is-7zip), [`bz2`](https://github.com/kevva/is-bzip2), [`gz`](https://github.com/kevva/is-gzip), [`rar`](https://github.com/kevva/is-rar), [`tar`](https://github.com/kevva/is-tar), [`zip`](https://github.com/kevva/is-zip), [`xz`](https://github.com/kevva/is-xz) or `false`.

@@ -34,0 +34,0 @@ #### buf

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc