Socket
Socket
Sign inDemoInstall

pug-runtime

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-runtime - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1-canary-10

16

index.js

@@ -250,14 +250,18 @@ 'use strict';

}
var context, lines, start, end;
try {
str = str || require('fs').readFileSync(filename, 'utf8');
str = str || require('fs').readFileSync(filename, {encoding: 'utf8'});
context = 3;
lines = str.split('\n');
start = Math.max(lineno - context, 0);
end = Math.min(lines.length, lineno + context);
} catch (ex) {
err.message +=
' - could not read from ' + filename + ' (' + ex.message + ')';
pug_rethrow(err, null, lineno);
return;
}
var context = 3,
lines = str.split('\n'),
start = Math.max(lineno - context, 0),
end = Math.min(lines.length, lineno + context);
// Error context
var context = lines
context = lines
.slice(start, end)

@@ -264,0 +268,0 @@ .map(function(line, i) {

@@ -12,3 +12,3 @@ module.exports = {

"escape": "function pug_escape(e){var a=\"\"+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s=\"\";for(r=t.index,c=0;r<a.length;r++){switch(a.charCodeAt(r)){case 34:n=\"&quot;\";break;case 38:n=\"&amp;\";break;case 60:n=\"&lt;\";break;case 62:n=\"&gt;\";break;default:continue}c!==r&&(s+=a.substring(c,r)),c=r+1,s+=n}return c!==r?s+a.substring(c,r):s}",
"rethrow": "function pug_rethrow(n,e,t,r){if(!(n instanceof Error))throw n;if(!(\"undefined\"==typeof window&&e||r))throw n.message+=\" on line \"+t,n;try{r=r||require(\"fs\").readFileSync(e,\"utf8\")}catch(e){pug_rethrow(n,null,t)}var a=3,i=r.split(\"\\n\"),o=Math.max(t-a,0),h=Math.min(i.length,t+a),a=i.slice(o,h).map(function(n,e){var r=e+o+1;return(r==t?\" > \":\" \")+r+\"| \"+n}).join(\"\\n\");n.path=e;try{n.message=(e||\"Pug\")+\":\"+t+\"\\n\"+a+\"\\n\\n\"+n.message}catch(n){}throw n}"
"rethrow": "function pug_rethrow(e,n,r,t){if(!(e instanceof Error))throw e;if(!(\"undefined\"==typeof window&&n||t))throw e.message+=\" on line \"+r,e;var o,a,i,s;try{t=t||require(\"fs\").readFileSync(n,{encoding:\"utf8\"}),o=3,a=t.split(\"\\n\"),i=Math.max(r-o,0),s=Math.min(a.length,r+o)}catch(t){return e.message+=\" - could not read from \"+n+\" (\"+t.message+\")\",void pug_rethrow(e,null,r)}o=a.slice(i,s).map(function(e,n){var t=n+i+1;return(t==r?\" > \":\" \")+t+\"| \"+e}).join(\"\\n\"),e.path=n;try{e.message=(n||\"Pug\")+\":\"+r+\"\\n\"+o+\"\\n\\n\"+e.message}catch(e){}throw e}"
}
{
"name": "pug-runtime",
"version": "3.0.0",
"version": "3.0.1-canary-10",
"description": "The runtime components for the pug templating language",

@@ -5,0 +5,0 @@ "keywords": [

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