Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

brfs

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brfs - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

test/files/multi_var.js

31

index.js

@@ -13,10 +13,25 @@ var fs = require('fs');

var dirname = path.dirname(file);
var pending = 0;
return through(write, end);
var tr = through(write, end);
return tr;
function write (buf) { data += buf }
function end () {
var tr = this;
var pending = 0;
try { var output = parse() }
catch (err) {
this.emit('error', new Error(
err.toString().replace('Error: ', '') + ' (' + file + ')')
);
}
if (pending === 0) finish(output);
}
function finish (output) {
tr.queue(String(output));
tr.queue(null);
}
function parse () {
var output = falafel(data, function (node) {

@@ -51,13 +66,7 @@ if (isRequire(node) && node.arguments[0].value === 'fs'

node.update(JSON.stringify(src));
if (--pending === 0) finish();
if (--pending === 0) finish(output);
});
}
});
if (pending === 0) finish();
function finish () {
tr.queue(String(output));
tr.queue(null);
}
return output;
}

@@ -64,0 +73,0 @@ };

{
"name": "brfs",
"version": "0.0.3",
"version": "0.0.4",
"description": "browserify fs.readFileSync() static asset inliner",

@@ -5,0 +5,0 @@ "main": "index.js",

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