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

trycatch

Package Overview
Dependencies
Maintainers
1
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trycatch - npm Package Compare versions

Comparing version 0.0.9 to 0.0.11

27

lib/trycatch.js
module.exports = trycatch;
var colors = require('colors');
// use colors module, if available
try { trycatch.colors = require('colors'); } catch(err) {}
var FormatStackTrace = require('./formatStackTrace');
var path = require('path');
var d = path.join('/');

@@ -100,12 +103,16 @@

var ret = [];
return frames.split("\n").filter(function(frame) {
ret = frames.split("\n").filter(function(frame) {
return frame.indexOf(filename1) < 0 && frame.indexOf(filename2) < 0;
}).map(function(frame, k) {
if (frame.indexOf('/node_modules/') >= 0) {
frame = colors.cyan(frame);
} else if (frame.indexOf('/') >= 0) {
frame = colors.red(frame);
}
return frame;
}).join("\n");
});
if (trycatch.colors) {
ret = ret.map(function(frame, k) {
if (frame.indexOf(d + 'node_modules' + d) >= 0) {
frame = trycatch.colors.cyan(frame);
} else if (frame.indexOf(d) >= 0) {
frame = trycatch.colors.red(frame);
}
return frame;
});
}
return ret.join("\n");
}
{
"name" : "trycatch",
"version" : "0.0.9",
"version" : "0.0.11",
"description" : "An asynchronous exception handler with long stack traces for node.js",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/CrabDude/trycatch",

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