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

smash

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smash - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

15

lib/smash/emit-imports.js

@@ -13,3 +13,4 @@ var path = require("path"),

directory = path.dirname(file),
extension = path.extname(file);
extension = path.extname(file),
lines = [];

@@ -25,2 +26,3 @@ file = expandFile(file, extension);

if (/^import\b/.test(line)) {
flush();
var match = /^import\s+"([^"]+)"\s*;?\s*(?:\/\/.*)?$/.exec(line);

@@ -33,8 +35,13 @@ if (match) {

}
} else if (line) {
emitter.emit("line", line);
} else {
lines.push(line, newline);
}
}
function flush() {
if (lines.length) emitter.emit("data", Buffer.concat(lines)), lines = [];
}
function end() {
flush();
emitter.emit("end");

@@ -49,1 +56,3 @@ }

};
var newline = new Buffer("\n");

2

lib/smash/smash.js

@@ -33,3 +33,3 @@ var stream = require("stream"),

.on("import", function(file) { q.defer(streamRecursive, file); })
.on("line", function(chunk) { q.defer(function(callback) { s.write(chunk + "\n", callback); }); })
.on("data", function(data) { q.defer(function(callback) { s.write(data, callback); }); })
.on("end", c);

@@ -36,0 +36,0 @@

{
"name": "smash",
"version": "0.0.10",
"version": "0.0.11",
"description": "Concatenate files together using import statements.",

@@ -5,0 +5,0 @@ "keywords": [

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