Socket
Socket
Sign inDemoInstall

minimize

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimize - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

2

lib/helpers.js

@@ -137,3 +137,3 @@ 'use strict';

if (!this.ancestor.length) {
element = element.replace(/\n/g, '').replace(/\s+/g, ' ');
element = element.replace(/\n/g, ' ').replace(/\s+/g, ' ');
}

@@ -140,0 +140,0 @@

{
"name": "minimize",
"version": "0.4.1",
"version": "0.4.2",
"description": "Minimize HTML",

@@ -5,0 +5,0 @@ "main": "./lib/minimize",

@@ -6,2 +6,3 @@ {

, "code": "<code class=\"copy\">\n<span>var http = require('http');\nhttp.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/plain'});\n res.end('hello, i know nodejitsu');\n})listen(8080);</span><a href=\"#\"><s class=\"ss-layers\" role=\"presentation\"></s> copy</a></code>"
, "newlines": "<li>We&#39;re <a href=\"http://nodejitsu.com\">Nodejitsu</a>, and we can give you scalable,\nfault-tolerant cloud hosting for your Node.js apps - and we&#39;re the best you&#39;ll\nfind.</li>"
, "doctype": {

@@ -43,4 +44,4 @@ "raw": "!doctype html"

, "multiline": {
"raw": "some additional lines\n\n. some random text, and alot of spaces"
, "data": "some additional lines\n\n. some random text, and alot of spaces"
"raw": "some additional lines.\n\n some random text, and alot of spaces"
, "data": "some additional lines.\n\n some random text, and alot of spaces"
, "type": "text"

@@ -47,0 +48,0 @@ }

@@ -277,3 +277,3 @@ 'use strict';

expect(helpers.text(html.multiline, '')).to.be.equal(
'some additional lines\n\n. some random text, and alot of spaces'
'some additional lines.\n\n some random text, and alot of spaces'
);

@@ -280,0 +280,0 @@ });

@@ -95,2 +95,9 @@ 'use strict';

it('should replace newlines between text with spaces', function (done) {
minimize.minimize(html.newlines, function (result) {
expect(result).to.equal("<li>We&#39;re <a href=\"http://nodejitsu.com\">Nodejitsu</a>, and we can give you scalable, fault-tolerant cloud hosting for your Node.js apps - and we&#39;re the best you&#39;ll find.</li>");
done();
});
});
it('should be configurable to retain CDATA');

@@ -97,0 +104,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