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

pretty-error

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-error - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

README.md

2

package.json
{
"name": "pretty-error",
"version": "0.1.7",
"version": "0.1.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "scripts/js/lib/PrettyError.js",

@@ -33,2 +33,9 @@ var ParsedError, PrettyError, RenderKid, array, defaultStyle, nodePaths, object, prop, _fn, _i, _len, _ref, _ref1,

PrettyError.listen = function(cb) {
var pe;
pe = new self;
pe.listen(cb);
return pe;
};
function PrettyError() {

@@ -46,2 +53,15 @@ this._maxItems = 50;

PrettyError.prototype.listen = function(cb) {
process.on('uncaughtException', (function(_this) {
return function(exc) {
_this.render(exc, true);
process.exit(1);
};
})(this));
if (cb != null) {
process.nextTick(cb);
}
return this;
};
PrettyError.prototype.config = function(c) {

@@ -265,41 +285,2 @@ var alias, path, _ref1;

PrettyError.prototype._skipOrFilter = function(item, itemNumber) {
var cb, modName, pair, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (typeof item === 'object') {
if (_ref1 = item.modName, __indexOf.call(this._packagesToSkip, _ref1) >= 0) {
return true;
}
if (_ref2 = item.path, __indexOf.call(this._pathsToSkip, _ref2) >= 0) {
return true;
}
_ref3 = item.packages;
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
modName = _ref3[_i];
if (__indexOf.call(this._packagesToSkip, modName) >= 0) {
return true;
}
}
if (typeof item.shortenedAddr === 'string') {
_ref4 = this._aliases;
for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
pair = _ref4[_j];
item.shortenedAddr = item.shortenedAddr.replace(pair.stringOrRx, pair.alias);
}
}
}
_ref5 = this._skipCallbacks;
for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) {
cb = _ref5[_k];
if (cb(item, itemNumber) === true) {
return true;
}
}
_ref6 = this._filterCallbacks;
for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
cb = _ref6[_l];
cb(item, itemNumber);
}
return false;
};
PrettyError.prototype.getObject = function(e) {

@@ -385,2 +366,41 @@ var count, header, i, item, obj, traceItems, _i, _len, _ref1;

PrettyError.prototype._skipOrFilter = function(item, itemNumber) {
var cb, modName, pair, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (typeof item === 'object') {
if (_ref1 = item.modName, __indexOf.call(this._packagesToSkip, _ref1) >= 0) {
return true;
}
if (_ref2 = item.path, __indexOf.call(this._pathsToSkip, _ref2) >= 0) {
return true;
}
_ref3 = item.packages;
for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
modName = _ref3[_i];
if (__indexOf.call(this._packagesToSkip, modName) >= 0) {
return true;
}
}
if (typeof item.shortenedAddr === 'string') {
_ref4 = this._aliases;
for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
pair = _ref4[_j];
item.shortenedAddr = item.shortenedAddr.replace(pair.stringOrRx, pair.alias);
}
}
}
_ref5 = this._skipCallbacks;
for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) {
cb = _ref5[_k];
if (cb(item, itemNumber) === true) {
return true;
}
}
_ref6 = this._filterCallbacks;
for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) {
cb = _ref6[_l];
cb(item, itemNumber);
}
return false;
};
return PrettyError;

@@ -387,0 +407,0 @@

module.exports = function() {
return {
'pretty-error': {
display: 'block'
display: 'block',
marginLeft: '2'
},

@@ -47,2 +48,5 @@ 'pretty-error > header': {

},
'pretty-error > trace > item > header > what': {
color: 'white'
},
'pretty-error > trace > item > footer': {

@@ -49,0 +53,0 @@ display: 'block'

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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