decompress
Advanced tools
Comparing version 0.1.8 to 0.1.9
13
index.js
'use strict'; | ||
var endsWith = require('mout/string/endsWith'); | ||
var find = require('mout/array/find'); | ||
var fs = require('fs'); | ||
var mapKey = require('map-key'); | ||
var mkdir = require('mkdirp'); | ||
@@ -37,6 +36,6 @@ var path = require('path'); | ||
'application/zip': this._extractZip, | ||
'application/x-gzip': this._extractTarGz, | ||
'application/x-tar': this._extractTar, | ||
'application/x-tgz': this._extractTarGz | ||
}; | ||
this.extractorTypes = Object.keys(this.extractors); | ||
this.extractor = this._getExtractor(this.ext); | ||
@@ -91,8 +90,3 @@ } | ||
src = src.toLowerCase(); | ||
var ext = find(this.extractorTypes, function (ext) { | ||
return endsWith(src, ext); | ||
}); | ||
return ext ? this.extractors[ext] : null; | ||
return mapKey.endsWith(this.extractors, src); | ||
}; | ||
@@ -182,2 +176,3 @@ | ||
var decompress = new Decompress(opts); | ||
console.log('decompress.extract() is deprecated, use decompress() instead'); | ||
return decompress.extract(); | ||
@@ -184,0 +179,0 @@ }; |
{ | ||
"name": "decompress", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Easily extract zip, tar and tar.gz archives", | ||
@@ -28,9 +28,9 @@ "keywords": [ | ||
"dependencies": { | ||
"adm-zip": "~0.4.3", | ||
"mkdirp": "~0.3.5", | ||
"mout": "~0.9.0", | ||
"rimraf": "~2.2.2", | ||
"stream-combiner": "~0.0.2", | ||
"tar": "~0.1.18", | ||
"tempfile": "~0.1.2" | ||
"adm-zip": "^0.4.3", | ||
"mkdirp": "^0.3.5", | ||
"rimraf": "^2.2.2", | ||
"stream-combiner": "^0.0.2", | ||
"tar": "^0.1.18", | ||
"tempfile": "^0.1.2", | ||
"map-key": "^0.1.0" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6364
148
+ Addedmap-key@^0.1.0
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedduplexer@0.0.4(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedlodash@2.4.2(transitive)
+ Addedmap-key@0.1.5(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedstream-combiner@0.0.2(transitive)
+ Addedunderscore.string@2.4.0(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedmout@~0.9.0
- Removedduplexer@0.1.2(transitive)
- Removedmout@0.9.1(transitive)
- Removedrimraf@2.2.8(transitive)
- Removedstream-combiner@0.0.4(transitive)
Updatedadm-zip@^0.4.3
Updatedmkdirp@^0.3.5
Updatedrimraf@^2.2.2
Updatedstream-combiner@^0.0.2
Updatedtar@^0.1.18
Updatedtempfile@^0.1.2