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

pug-error

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-error - npm Package Compare versions

Comparing version 1.3.3 to 2.0.0-canary-1

32

index.js

@@ -16,15 +16,17 @@ 'use strict';

// Error context
var context = lines.slice(start, end).map(function(text, i){
var curr = i + start + 1;
var preamble = (curr == line ? ' > ' : ' ')
+ curr
+ '| ';
var out = preamble + text;
if (curr === line && column > 0) {
out += '\n';
out += Array(preamble.length + column).join('-') + '^';
}
return out;
}).join('\n');
fullMessage = (filename || 'Pug') + ':' + location + '\n' + context + '\n\n' + message;
var context = lines
.slice(start, end)
.map(function(text, i) {
var curr = i + start + 1;
var preamble = (curr == line ? ' > ' : ' ') + curr + '| ';
var out = preamble + text;
if (curr === line && column > 0) {
out += '\n';
out += Array(preamble.length + column).join('-') + '^';
}
return out;
})
.join('\n');
fullMessage =
(filename || 'Pug') + ':' + location + '\n' + context + '\n\n' + message;
} else {

@@ -40,3 +42,3 @@ fullMessage = (filename || 'Pug') + ':' + location + '\n\n' + message;

err.src = src;
err.toJSON = function () {
err.toJSON = function() {
return {

@@ -47,3 +49,3 @@ code: this.code,

column: this.column,
filename: this.filename
filename: this.filename,
};

@@ -50,0 +52,0 @@ };

{
"name": "pug-error",
"version": "1.3.3",
"version": "2.0.0-canary-1",
"description": "Standard error objects for pug",

@@ -16,4 +16,3 @@ "keywords": [

"author": "Forbes Lindesay",
"license": "MIT",
"gitHead": "1bdf628a70fda7a0d840c52f3abce54b1c6b0130"
"license": "MIT"
}
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