Skip to content

Commit c304c88

Browse files
committed
Remove setimmediate dependency
1 parent f5ca92f commit c304c88

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

lib/utils.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ var support = require("./support");
44
var base64 = require("./base64");
55
var nodejsUtils = require("./nodejsUtils");
66
var external = require("./external");
7-
require("setimmediate");
8-
97

108
/**
119
* Convert a string that pass as a "binary string": it should represent a byte
@@ -402,7 +400,7 @@ exports.pretty = function(str) {
402400
* @param {Array} args the arguments to give to the callback.
403401
*/
404402
exports.delay = function(callback, args, self) {
405-
setImmediate(function () {
403+
Promise.resolve().then(function () {
406404
callback.apply(self || null, args || []);
407405
});
408406
};

package-lock.json

Lines changed: 4 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
"dependencies": {
6161
"lie": "~3.3.0",
6262
"pako": "~1.0.2",
63-
"readable-stream": "~2.3.6",
64-
"setimmediate": "^1.0.5"
63+
"readable-stream": "~2.3.6"
6564
},
6665
"license": "(MIT OR GPL-3.0-or-later)"
6766
}

0 commit comments

Comments
 (0)