Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

decompress

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decompress - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

1

decompress.js

@@ -28,2 +28,3 @@ 'use strict';

opts = opts || {};
opts.path = opts.path || process.cwd();
var extractor = this._getExtractor(opts.type);

@@ -30,0 +31,0 @@

4

package.json
{
"name": "decompress",
"version": "0.1.0",
"description": "Extract archives",
"version": "0.1.1",
"description": "Easily extract zip, tar and tar.gz archives",
"keywords": [

@@ -6,0 +6,0 @@ "extract",

# decompress [![Build Status](https://secure.travis-ci.org/kevva/decompress.png?branch=master)](http://travis-ci.org/kevva/decompress)
Easily extract `.zip`, `.tar` and `.tar.gz` archives. Based on the extract
utility in Bower.
utility in [Bower](https://github.com/bower/bower).

@@ -12,2 +12,5 @@ ## Getting started

You'll only need to give decompress a `type` and it'll figure the rest out for
you.
```js

@@ -25,7 +28,9 @@ var decompress = require('decompress');

Extract an archive using the `type` option to determine which extractor to use.
Extract an archive using the `type` option to determine which extractor to use.
If no `path` is specified it'll extract it to your current location.
### decompress.canExtract(file)
### decompress.canExtract(src, mime)
Determine if the file can be extracted or not.
Determine if a file can be extracted or not by checking the file extension
and/or the MIME type.

@@ -35,6 +40,18 @@ ```js

// => true
decompress.canExtract('application/zip');
// => true
```
## Options
* `type` — String that can be a file name, URL or a MIME type for example.
* `path` — Path to extract the archive to. If no `path` is specified it'll
extract it to your current location.
You can also define options accepted by the different extractors. See [unzip](https://github.com/nearinfinity/node-unzip/) and [tar](https://github.com/isaacs/node-tar/)
for more information.
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License) (c) [Kevin Mårtensson](http://kevinmartensson.com)
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc