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

express-error

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-error - npm Package Compare versions

Comparing version 0.0.5-pre to 0.0.5

3

index.js

@@ -1,3 +0,2 @@

// Generated by CoffeeScript 1.3.3
// Generated by CoffeeScript 1.6.3
module.exports = require("./lib/expressError");

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.3.3
// Generated by CoffeeScript 1.6.3
var FS, HOME, Path, Utils, alignLeft, betterStack, env, formatHtml, formatText, handleUncaughtExceptions, htmlEscape, injectSourceLines;

@@ -40,3 +40,3 @@

injectSourceLines = function(lines, contextLinesCount) {
var cache, codeFile, coffee, col, collectSource, ext, i, lineObj, linenum, matches, newLines, pushLine, re, text;
var cache, codeFile, coffee, col, collectSource, err, ext, i, lineObj, linenum, matches, newLines, pushLine, re, text;
newLines = [];

@@ -107,3 +107,4 @@ collectSource = true;

pushLine(text);
} catch (err) {
} catch (_error) {
err = _error;
console.log(err.stack);

@@ -130,4 +131,7 @@ }

var line, lines, result, _i, _len;
if (!stack) {
return "";
}
result = [];
lines = stack.split("\n");
result = [];
for (_i = 0, _len = lines.length; _i < _len; _i++) {

@@ -209,3 +213,15 @@ line = lines[_i];

return function(err, req, res, next) {
var accept, message, newerr;
var accept, message, name, newerr, status;
if (typeof err === "number") {
status = err;
name = http.STATUS_CODES[status];
err = new Error(name);
err.name = name;
err.status = status;
} else if (typeof err === "string") {
name = err;
err = new Error(name);
err.name = name;
err.status = 500;
}
if (err.status) {

@@ -212,0 +228,0 @@ res.statusCode = err.status;

@@ -1,3 +0,2 @@

// Generated by CoffeeScript 1.3.3
// Generated by CoffeeScript 1.6.3
exports.tabToSpaces = function(s, spaceCount) {

@@ -4,0 +3,0 @@ var char, chars, i, k, len, out, spaces, _i, _j;

{
"name": "express-error",
"version": "0.0.5-pre",
"version": "0.0.5",
"description": "Display source code in express' error stack for JavaScript or CoffeeScript",
"keywords": "express3 error stack coffee-script coffee",
"keywords": ["express3", "error", "coffee-script", "coffee"],
"main": "index.js",

@@ -7,0 +7,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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