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 1.2.1 to 1.3.0

foo.js

12

lib/formatError.js

@@ -5,6 +5,4 @@ var path = require('path')

// use colors module, if available
if (process.stdout.isTTY) {
try {colors = require('colors') } catch(err) {}
}
// use chalk module, if available
try {chalk = require('chalk') } catch(err) {}

@@ -96,3 +94,3 @@ function formatError(err, options) {

if (colors) {
if (chalk) {
if (line.indexOf(node_modules) >= 0) {

@@ -111,4 +109,4 @@ type = "node_modules";

if (colors[color]) {
return colors[color](line);
if (chalk[color] && chalk[color] !== 'default') {
return chalk[color](line);
}

@@ -115,0 +113,0 @@ }

@@ -5,2 +5,3 @@ var util = require('util')

, hookit = require('hookit')
, chalk = require('chalk')
, formatErrorWithOptions = require('./formatError').formatError

@@ -17,3 +18,3 @@ , normalizeError = require('./formatError').normalizeError

, 'colors': {
'node': 'white',
'node': 'default',
'node_modules': 'cyan',

@@ -282,3 +283,4 @@ 'default': 'red'

trycatch.format = null
trycatch.chalk = chalk
module.exports = trycatch
module.exports = trycatch
{
"name": "trycatch",
"version": "1.2.1",
"version": "1.3.0",
"description": "An asynchronous domain-based exception handler with long stack traces for node.js",

@@ -32,4 +32,4 @@ "homepage": "http://github.com/CrabDude/trycatch",

"dependencies": {
"colors": ">=0.5.0 <0.6",
"hookit": "~0.1.1"
"hookit": "~0.1.1",
"chalk": "^0.4.0"
},

@@ -36,0 +36,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