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

nodesi

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodesi - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

4

lib/esi.js

@@ -89,3 +89,5 @@ /* jshint node:true */

if(nextTagFullClose > nextTagSelfClose) {
if(nextTagFullClose > -1 &&
(Math.max(0, nextTagFullClose - fullClose.length) < Math.max(0, nextTagSelfClose - selfClose.length)) ||
nextTagSelfClose === -1) {
tags.push(reducedHtml.substr(0, nextTagFullClose + fullClose.length));

@@ -92,0 +94,0 @@ reducedHtml = reducedHtml.substr(nextTagFullClose + fullClose.length);

{
"name": "nodesi",
"version": "1.0.7",
"version": "1.0.8",
"description": "ESI: the good parts in node.js",

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

@@ -119,2 +119,23 @@ /* jshint node:true */

it('should handle self-closing tags in html', function (done) {
// given
server.addListener('request', function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<div>test</div>');
});
var html = '<section><esi:include src="http://localhost:' + port + '"></esi:include><img src="some-image" /></section>';
// when
var processed = new ESI().process(html);
// then
processed.then(function (response) {
assert.equal(response, '<section><div>test</div><img src="some-image" /></section>');
done();
}).catch(done);
});
it('should fetch one relative component', function (done) {

@@ -121,0 +142,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