New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bal-util

Package Overview
Dependencies
Maintainers
1
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bal-util - npm Package Compare versions

Comparing version 1.8.4 to 1.8.5

68

out/lib/events.js

@@ -55,10 +55,6 @@ // Generated by CoffeeScript 1.3.3

} catch (err) {
if (typeof next === "function") {
next(err);
}
next(err);
return this;
} finally {
if (typeof next === "function") {
next();
}
next();
}

@@ -68,3 +64,3 @@ } else {

if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -84,10 +80,6 @@ return _this.lock(eventName, next);

} catch (err) {
if (typeof next === "function") {
next(err);
}
next(err);
return this;
} finally {
if (typeof next === "function") {
next();
}
next();
}

@@ -102,3 +94,3 @@ return this;

if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -110,10 +102,6 @@ event = _this.event(eventName);

} catch (err) {
if (typeof next === "function") {
next(err);
}
next(err);
return _this;
} finally {
if (typeof next === "function") {
next();
}
next();
}

@@ -137,3 +125,3 @@ });

if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -143,10 +131,6 @@ try {

} catch (err) {
if (typeof next === "function") {
next(err);
}
next(err);
return _this;
} finally {
if (typeof next === "function") {
next();
}
next();
}

@@ -166,5 +150,3 @@ });

} else {
if (typeof next === "function") {
next();
}
next();
}

@@ -178,5 +160,3 @@ return this;

if (event.finished) {
if (typeof next === "function") {
next();
}
next();
} else {

@@ -192,5 +172,3 @@ this.once(eventName + ':finished', next);

if (event.finished) {
if (typeof next === "function") {
next();
}
next();
}

@@ -208,3 +186,3 @@ this.on(eventName + ':finished', next);

EventSystem.prototype.block = function(eventNames, next) {
var done, eventName, total, _i, _len;
var done, err, eventName, total, _i, _len;
if ((eventNames instanceof Array) === false) {

@@ -214,3 +192,4 @@ if (typeof eventNames === 'string') {

} else {
return typeof next === "function" ? next(new Error('Unknown eventNames type')) : void 0;
err = new Error('Unknown eventNames type');
return next(err);
}

@@ -225,7 +204,7 @@ }

done = total;
return typeof next === "function" ? next(err) : void 0;
return next(err);
}
done++;
if (done === total) {
return typeof next === "function" ? next() : void 0;
return next();
}

@@ -238,3 +217,3 @@ });

EventSystem.prototype.unblock = function(eventNames, next) {
var done, eventName, total, _i, _len;
var done, err, eventName, total, _i, _len;
if ((eventNames instanceof Array) === false) {

@@ -244,3 +223,4 @@ if (typeof eventNames === 'string') {

} else {
return typeof next === "function" ? next(new Error('Unknown eventNames type')) : void 0;
err = new Error('Unknown eventNames type');
return next(err);
}

@@ -255,7 +235,7 @@ }

done = total;
return typeof next === "function" ? next(err) : void 0;
return next(err);
}
done++;
if (done === total) {
return typeof next === "function" ? next() : void 0;
return next();
}

@@ -262,0 +242,0 @@ });

@@ -223,5 +223,3 @@ // Generated by CoffeeScript 1.3.3

}
if (typeof this.next === "function") {
this.next(errors, lastResult, results);
}
this.next(errors, lastResult, results);
}

@@ -228,0 +226,0 @@ return this;

@@ -180,3 +180,3 @@ // Generated by CoffeeScript 1.3.3

}
return typeof next === "function" ? next(err, results) : void 0;
return next(err, results);
});

@@ -183,0 +183,0 @@ return this;

@@ -38,5 +38,3 @@ // Generated by CoffeeScript 1.3.3

++global.numberOfOpenFiles;
if (typeof next === "function") {
next();
}
next();
}

@@ -60,3 +58,3 @@ return this;

balUtilPaths.closeFile();
return typeof next === "function" ? next(err, data) : void 0;
return next(err, data);
});

@@ -73,3 +71,3 @@ });

if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -79,3 +77,3 @@ return balUtilPaths.openFile(function() {

balUtilPaths.closeFile();
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -94,3 +92,3 @@ });

balUtilPaths.closeFile();
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -104,3 +102,3 @@ });

balUtilPaths.closeFile();
return typeof next === "function" ? next(err, stat) : void 0;
return next(err, stat);
});

@@ -114,3 +112,3 @@ });

balUtilPaths.closeFile();
return typeof next === "function" ? next(err, files) : void 0;
return next(err, files);
});

@@ -124,3 +122,3 @@ });

balUtilPaths.closeFile();
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -134,3 +132,3 @@ });

balUtilPaths.closeFile();
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -146,3 +144,3 @@ });

balUtilPaths.closeFile();
return typeof next === "function" ? next(exists) : void 0;
return next(exists);
});

@@ -162,3 +160,3 @@ });

console.log("balUtilPaths.cp: cp failed on: " + src);
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -169,3 +167,3 @@ return balUtilPaths.writeFile(dst, data, 'binary', function(err) {

}
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -185,3 +183,3 @@ });

if (exists) {
return typeof next === "function" ? next() : void 0;
return next();
}

@@ -192,3 +190,3 @@ parentPath = balUtilPaths.getParentPathSync(path);

console.log("balUtilPaths.ensurePath: failed to ensure the path: " + parentPath);
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -199,5 +197,5 @@ return balUtilPaths.mkdir(path, '700', function(err) {

console.log("balUtilPaths.ensurePath: failed to create the directory: " + path);
return typeof next === "function" ? next(new Error("Failed to create the directory: " + path)) : void 0;
return next(new Error("Failed to create the directory: " + path));
}
return typeof next === "function" ? next() : void 0;
return next();
});

@@ -217,11 +215,8 @@ });

isDirectory: function(path, next) {
balUtilPaths.openFile(function() {
return balUtilPaths.stat(path, function(err, stat) {
balUtilPaths.closeFile();
if (err) {
console.log("balUtilPaths.isDirectory: stat failed on: " + path);
return typeof next === "function" ? next(err) : void 0;
}
return typeof next === "function" ? next(null, stat.isDirectory(), stat) : void 0;
});
balUtilPaths.stat(path, function(err, stat) {
if (err) {
console.log("balUtilPaths.isDirectory: stat failed on: " + path);
return next(err);
}
return next(null, stat.isDirectory(), stat);
});

@@ -241,3 +236,3 @@ return this;

next: function(err, list, tree) {
return typeof next === "function" ? next(err, tree) : void 0;
return next(err, tree);
}

@@ -265,3 +260,3 @@ });

if (next) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
} else {

@@ -300,3 +295,3 @@ throw err;

if (next) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
} else {

@@ -307,3 +302,3 @@ throw err;

tasks = new balUtilFlow.Group(function(err) {
return typeof options.next === "function" ? options.next(err, list, tree) : void 0;
return options.next(err, list, tree);
});

@@ -444,3 +439,3 @@ balUtilPaths.readdir(options.path, function(err, files) {

if (next) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
} else {

@@ -458,3 +453,3 @@ throw err;

console.log('balUtilPaths.cpdir: failed to create the path for the file:', fileSrcPath);
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -465,3 +460,3 @@ return balUtilPaths.cp(fileSrcPath, fileOutPath, function(err) {

}
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -491,3 +486,3 @@ });

if (next) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
} else {

@@ -505,3 +500,3 @@ throw err;

console.log('balUtilPaths.rpdir: failed to create the path for the file:', fileSrcPath);
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -514,6 +509,6 @@ return balUtilPaths.isPathOlderThan(fileOutPath, fileSrcPath, function(err, older) {

}
return typeof next === "function" ? next(err) : void 0;
return next(err);
});
} else {
return typeof next === "function" ? next() : void 0;
return next();
}

@@ -537,3 +532,3 @@ });

if (!exists) {
return typeof next === "function" ? next() : void 0;
return next();
}

@@ -545,6 +540,6 @@ return balUtilPaths.scandir(parentPath, function(fileFullPath, fileRelativePath, next) {

}
return typeof next === "function" ? next(err) : void 0;
return next(err);
});
}, function(fileFullPath, fileRelativePath, next) {
return typeof next === "function" ? next(null, false, function(next) {
return next(null, false, function(next) {
return balUtilPaths.rmdirDeep(fileFullPath, function(err) {

@@ -554,8 +549,8 @@ if (err) {

}
return typeof next === "function" ? next(err) : void 0;
return next(err);
});
}) : void 0;
});
}, function(err, list, tree) {
if (err) {
return typeof next === "function" ? next(err, list, tree) : void 0;
return next(err, list, tree);
}

@@ -566,3 +561,3 @@ return balUtilPaths.rmdir(parentPath, function(err) {

}
return typeof next === "function" ? next(err, list, tree) : void 0;
return next(err, list, tree);
});

@@ -576,3 +571,3 @@ });

tasks = new balUtilFlow.Group(function(err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -618,6 +613,6 @@ balUtilPaths.ensurePath(dstPath, function(err) {

return res.on('end', function() {
return typeof next === "function" ? next(null, data) : void 0;
return next(null, data);
});
}).on('error', function(err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
});

@@ -627,5 +622,5 @@ } else {

if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}
return typeof next === "function" ? next(null, data) : void 0;
return next(null, data);
});

@@ -638,9 +633,9 @@ }

if (!exists) {
return typeof next === "function" ? next(null, true) : void 0;
return next(null, true);
}
return balUtilPaths.stat(filePath, function(err, stat) {
if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}
return typeof next === "function" ? next(null, stat.size === 0) : void 0;
return next(null, stat.size === 0);
});

@@ -662,3 +657,3 @@ });

if (empty || err) {
return typeof next === "function" ? next(err, null) : void 0;
return next(err, null);
}

@@ -668,3 +663,3 @@ return balUtilPaths.stat(aPath, function(err, aStat) {

if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -678,3 +673,3 @@ compare = function() {

}
return typeof next === "function" ? next(null, older) : void 0;
return next(null, older);
};

@@ -684,7 +679,7 @@ if (mode === 'path') {

if (empty || err) {
return typeof next === "function" ? next(err, null) : void 0;
return next(err, null);
}
return balUtilPaths.stat(bPath, function(err, bStat) {
if (err) {
return typeof next === "function" ? next(err) : void 0;
return next(err);
}

@@ -691,0 +686,0 @@ bMtime = bStat.mtime;

{
"name": "bal-util",
"version": "1.8.4",
"version": "1.8.5",
"description": "Common utility functions for Node.js used and maintained by Benjamin Lupton",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/balupton/bal-util",

Sorry, the diff of this file is not supported yet

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