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

ejs

Package Overview
Dependencies
Maintainers
0
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ejs - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

5

History.md
0.4.1 / 2011-04-21
==================
* Fixed error context
0.4.0 / 2011-04-21

@@ -3,0 +8,0 @@ ==================

28

lib/ejs.js

@@ -19,3 +19,3 @@

exports.version = '0.4.0';
exports.version = '0.4.1';

@@ -79,10 +79,11 @@ /**

var lines = str.split('\n')
, start = Math.max( lineno - 3, 0 )
, end = Math.min( lines.length - start , lineno + 3 );
, start = Math.max(lineno - 3, 0)
, end = Math.min(lines.length, lineno + 3);
// Error context
var context = lines.slice(start, end).map(function(line, i){
return (i + 1 != lineno ? ' ' : ' >> ')
+ (i + start + 1)
+ "| "
var curr = i + start + 1;
return (curr == lineno ? ' >> ' : ' ')
+ curr
+ '| '
+ line;

@@ -126,16 +127,16 @@ }).join('\n');

var prefix, postfix;
var prefix, postfix, line = '__stack.lineno=' + lineno;
switch (str[i]) {
case '=':
prefix = "', escape(";
postfix = "), '";
prefix = "', escape((" + line + ', ';
postfix = ")), '";
++i;
break;
case '-':
prefix = "', ";
postfix = ", '";
prefix = "', (" + line + ', ';
postfix = "), '";
++i;
break;
default:
prefix = "'); __stack.lineno="+lineno+"; ";
prefix = "');" + line + ';';
postfix = "; buf.push('";

@@ -164,2 +165,3 @@ }

}
buf.push("');\n}\nreturn buf.join('');");

@@ -188,3 +190,3 @@ return buf.join('');

str = [
'var __stack = { lineno: 1, input: '+input+', filename: '+filename+' };',
'var __stack = { lineno: 1, input: ' + input + ', filename: ' + filename + ' };',
rethrow.toString(),

@@ -191,0 +193,0 @@ 'try {',

{
"name": "ejs",
"description": "Embedded JavaScript templates",
"version": "0.4.0",
"version": "0.4.1",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "keywords": ["template", "engine", "ejs"],

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