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.8.1 to 1.8.2

27

out/lib/paths.js
// Generated by CoffeeScript 1.3.1
(function() {
var balUtilFlow, balUtilPaths, fsUtil, pathUtil, request,
var balUtilFlow, balUtilPaths, fsUtil, pathUtil,
__slice = [].slice,

@@ -15,4 +15,2 @@ __hasProp = {}.hasOwnProperty;

request = null;
if (global.numberOfOpenFiles == null) {

@@ -579,12 +577,17 @@ global.numberOfOpenFiles = 0;

readPath: function(filePath, next) {
var _this = this;
var http, requestOptions;
if (/^http/.test(filePath)) {
if (!request) {
request = require('request');
}
request(filePath, function(err, response, data) {
if (err) {
return typeof next === "function" ? next(err) : void 0;
}
return typeof next === "function" ? next(null, data) : void 0;
requestOptions = require('url').parse(filePath);
http = requestOptions.protocol === 'https:' ? require('https') : require('http');
http.get(requestOptions, function(res) {
var data;
data = '';
res.on('data', function(chunk) {
return data += chunk;
});
return res.on('end', function() {
return typeof next === "function" ? next(null, data) : void 0;
});
}).on('error', function(err) {
return typeof next === "function" ? next(err) : void 0;
});

@@ -591,0 +594,0 @@ } else {

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

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

},
"optionalDependencies": {
"request": "2.9.x"
},
"devDependencies": {

@@ -43,0 +40,0 @@ "coffee-script": "1.3.x",

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