Huge News!Announcing our $40M Series B led by Abstract Ventures.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.6.2 to 1.6.3

27

lib/paths.js

@@ -22,11 +22,18 @@ // Generated by CoffeeScript 1.3.1

if (global.maxNumberOfOpenFiles == null) {
global.maxNumberOfOpenFiles = 500;
global.maxNumberOfOpenFiles = 100;
}
if (global.waitingToOpenFileDelay == null) {
global.waitingToOpenFileDelay = 100;
}
balUtilPaths = {
openFile: function(next) {
if (global.numberOfOpenFiles < 0) {
throw new Error("balUtilPaths.openFile: the numberOfOpenFiles is [" + global.numberOfOpenFiles + "] which should be impossible...");
}
if (global.numberOfOpenFiles >= global.maxNumberOfOpenFiles) {
setTimeout(function() {
return balUtilPaths.openFile(next);
}, 50);
}, global.waitingToOpenFileDelay);
} else {

@@ -176,9 +183,11 @@ ++global.numberOfOpenFiles;

isDirectory: function(path, next) {
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.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;
});
});

@@ -185,0 +194,0 @@ return this;

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

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

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