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

minifyify

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minifyify - npm Package Compare versions

Comparing version 1.1.2 to 2.0.1

.npmignore

24

lib/registry/index.js
var Registry
, Node = require('./node')
, SrcNode = require('./node')
, _ = require('lodash')
, utils = require('utilities')
, SM = require('source-map')

@@ -40,9 +39,6 @@ , SMGenerator = SM.SourceMapGenerator

*/
Registry.prototype.minify = function (opts, cb) {
Registry.prototype.minify = function (opts) {
var self = this
, lines = this.code.split('\n')
, generator = this.createGenerator(opts)
, min
// Lines lost to minification
, deletedLines = 0
// What the last line saved from

@@ -52,8 +48,5 @@ // the original bundle is

, buffer = []
, chain
, chainParams = []
, minifyNode = function (node, next) {
, minifyNode = function (node) {
var range = node.range()
, consumer
, ii
, firstGeneratedLine;

@@ -72,2 +65,7 @@

// If minification removed EVERYTHING, use the minified code.
// It was probably already minified, like the prelude
if(res.code === '') {
return;
}

@@ -117,6 +115,6 @@ // We need this to offset the generated line numberse

minifyNode(node);
})
});
// Add the remaining code after the last node
for(highWaterMark, ii=lines.length;
for(var ii=lines.length;
highWaterMark<ii; highWaterMark++) {

@@ -170,3 +168,3 @@ buffer.push(lines[highWaterMark]);

if(!this.sourceNodes[file]) {
this.sourceNodes[file] = new Node(file, this.map.sourceContentFor(file));
this.sourceNodes[file] = new SrcNode(file, this.map.sourceContentFor(file));
}

@@ -173,0 +171,0 @@

@@ -21,3 +21,3 @@ {

],
"version": "1.1.2",
"version": "2.0.1",
"repository": {

@@ -42,2 +42,5 @@ "type": "git",

},
"peerDependencies": {
"browserify": "~3.30.0"
},
"scripts": {

@@ -47,3 +50,3 @@ "test": "jake test --trace"

"devDependencies": {
"browserify": "2.34.x",
"browserify": "~3.30.0",
"jake": "0.7.x",

@@ -62,2 +65,2 @@ "jquery-browserify": "latest",

"license": "MIT"
}
}

@@ -7,2 +7,4 @@ Minifyify

*Now with browserify 3 support*
Before, browserify made you choose between sane debugging and sane load times. Now, you can have both.

@@ -14,7 +16,2 @@

## New in 1.0.x
* Simpler, streaming API
* A much more robust algorithm
* Such speed, much performance
## Usage

@@ -21,0 +18,0 @@

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