Socket
Socket
Sign inDemoInstall

minimize

Package Overview
Dependencies
44
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.0 to 1.8.1

3

lib/minimize.js

@@ -38,3 +38,4 @@ 'use strict';

this.htmlparser = parser || new html.Parser(
new html.DomHandler(this.emits('read')), options.dom
new html.DomHandler(this.emits('read')),
options.dom
);

@@ -41,0 +42,0 @@

{
"name": "minimize",
"version": "1.8.0",
"version": "1.8.1",
"description": "Minimize HTML",

@@ -17,15 +17,15 @@ "main": "./lib/minimize",

"argh": "~0.1.4",
"async": "~1.4.2",
"async": "~1.5.2",
"cli-color": "~1.1.0",
"diagnostics": "~1.0.1",
"emits": "~3.0.0",
"htmlparser2": "~3.8.3",
"node-uuid": "~1.4.3"
"htmlparser2": "~3.9.0",
"node-uuid": "~1.4.7"
},
"devDependencies": {
"chai": "~3.3.0",
"istanbul": "~0.4.0",
"mocha": "~2.3.3",
"pre-commit": "~1.1.1",
"sinon": "~1.17.1",
"chai": "~3.4.1",
"istanbul": "~0.4.2",
"mocha": "~2.3.4",
"pre-commit": "~1.1.2",
"sinon": "~1.17.2",
"sinon-chai": "~2.8.0"

@@ -32,0 +32,0 @@ },

@@ -29,6 +29,2 @@ # HTML minifier

## Upcoming in release 2.0
- minification of inline javascript with uglify or similar
## Usage

@@ -68,5 +64,8 @@

, html = require('htmlparser2')
, minimize = new Minimize(new html.Parser(
new html.FeedHandler((this.emits('read'))
), { /* options */ });
, minimize = new Minimize(
new html.Parser(
new html.FeedHandler(minimize.emits('read')),
{ /* options */ }
)
);

@@ -73,0 +72,0 @@ minimize.parse(content, function (error, data) {

@@ -65,2 +65,4 @@ 'use strict';

it('can emit the parsed content to `minimize.read`');
it('should start traversing the DOM as soon as HTML parser is ready', function (done) {

@@ -67,0 +69,0 @@ var emit = sinon.spy(minimize, 'emit');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc