forked from EvanOxfeld/node-unzip
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* eslint * only run on 18
- Loading branch information
Showing
45 changed files
with
785 additions
and
840 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import globals from "globals"; | ||
import pluginJs from "@eslint/js"; | ||
|
||
|
||
export default [ | ||
{ | ||
rules:{ | ||
"semi": 2, | ||
"no-multiple-empty-lines": 2, | ||
"no-multi-spaces": 2, | ||
"comma-spacing": 2, | ||
"prefer-const": 2, | ||
"no-trailing-spaces": 2, | ||
"no-var": 2, | ||
"indent": [ | ||
"error", | ||
2, | ||
{ | ||
"MemberExpression": 1, | ||
"SwitchCase": 1, | ||
"ignoredNodes": ["TemplateLiteral > *"] | ||
} | ||
], | ||
} | ||
}, | ||
{files: ["**/*.js"], languageOptions: {sourceType: "script"}}, | ||
{languageOptions: { globals: globals.node }}, | ||
pluginJs.configs.recommended, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
var Promise = require('bluebird'); | ||
var Stream = require('stream'); | ||
const Stream = require('stream'); | ||
|
||
module.exports = function(entry) { | ||
return new Promise(function(resolve,reject) { | ||
var chunks = []; | ||
var bufferStream = Stream.Transform() | ||
.on('finish',function() { | ||
return new Promise(function(resolve, reject) { | ||
const chunks = []; | ||
const bufferStream = Stream.Transform() | ||
.on('finish', function() { | ||
resolve(Buffer.concat(chunks)); | ||
}) | ||
.on('error',reject); | ||
bufferStream._transform = function(d,e,cb) { | ||
.on('error', reject); | ||
|
||
bufferStream._transform = function(d, e, cb) { | ||
chunks.push(d); | ||
cb(); | ||
}; | ||
entry.on('error',reject) | ||
entry.on('error', reject) | ||
.pipe(bufferStream); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
var Stream = require('stream'); | ||
var util = require('util'); | ||
const Stream = require('stream'); | ||
const util = require('util'); | ||
function NoopStream() { | ||
if (!(this instanceof NoopStream)) { | ||
return new NoopStream(); | ||
} | ||
Stream.Transform.call(this); | ||
} | ||
|
||
util.inherits(NoopStream,Stream.Transform); | ||
util.inherits(NoopStream, Stream.Transform); | ||
|
||
NoopStream.prototype._transform = function(d, e, cb) { cb() ;}; | ||
|
||
NoopStream.prototype._transform = function(d,e,cb) { cb() ;}; | ||
|
||
module.exports = NoopStream; |
Oops, something went wrong.