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

connect-preprocess

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-preprocess - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

12

index.js

@@ -62,16 +62,12 @@ module.exports = function( options ) {

res.end = function( string , encoding ) {
restore();
encoding = encoding || 'utf-8';
if (res.data && $preprocessor._accepts( req , res )) {
var body = $preprocessor.engine( res.data );
string = $preprocessor.engine( res.data );
if (res.data !== undefined && !res._header) {
res.setHeader( 'Content-Length' , Buffer.byteLength( body , encoding ));
res.setHeader( 'Content-Length' , Buffer.byteLength( string , encoding ));
}
res.data = '';
restore();
res.end( body , encoding );
}
else {
restore();
next();
}
res.end( string , encoding );
};

@@ -78,0 +74,0 @@

{
"name": "connect-preprocess",
"description": "flexible preprocessor middleware for connect / express.",
"version": "0.1.2",
"version": "0.1.3",
"main": "index.js",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/elnarddogg/connect-preprocess",

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