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

spex

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spex - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

8

lib/errors/batch.js

@@ -118,9 +118,3 @@ 'use strict';

lines.push(gap3 + 'success: ' + d.success);
if (d.result instanceof BatchError) {
lines.push(gap3 + 'result: ' + d.result.toString(level + 3));
} else {
lines.push(gap3 + 'result: ' + $npm.u.inspect(d.result));
}
lines.push(gap3 + 'result: ' + $npm.utils.formatError(d.result, level + 3));
if (d.origin) {

@@ -127,0 +121,0 @@ lines.push(gap3 + 'origin: ' + $npm.u.inspect(d.origin));

@@ -116,19 +116,4 @@ 'use strict';

var names = ['BatchError', 'PageError', 'SequenceError'];
var error;
if (this.error instanceof Error) {
if (names.indexOf(this.error.name) === -1) {
error = $npm.u.inspect(this.error) + '\n' + $npm.utils.getStack(this.error, level + 1);
} else {
error = this.error.toString(level + 1);
}
} else {
error = $npm.u.inspect(this.error);
}
lines.push(gap1 + 'error: ' + error);
lines.push(gap1 + 'error: ' + $npm.utils.formatError(this.error, level + 1));
lines.push(gap0 + '}');
return lines.join($npm.os.EOL);

@@ -135,0 +120,0 @@ };

@@ -106,19 +106,4 @@ 'use strict';

var names = ['BatchError', 'PageError', 'SequenceError'];
var error;
if (this.error instanceof Error) {
if (names.indexOf(this.error.name) === -1) {
error = $npm.u.inspect(this.error) + '\n' + $npm.utils.getStack(this.error, level + 1);
} else {
error = this.error.toString(level + 1);
}
} else {
error = $npm.u.inspect(this.error);
}
lines.push(gap1 + 'error: ' + error);
lines.push(gap1 + 'error: ' + $npm.utils.formatError(this.error, level + 1));
lines.push(gap0 + '}');
return lines.join($npm.os.EOL);

@@ -125,0 +110,0 @@ };

2

lib/utils/index.js

@@ -8,3 +8,3 @@ 'use strict';

var exp = {
getStack: stat.getStack,
formatError: stat.formatError,
isPromise: stat.isPromise,

@@ -11,0 +11,0 @@ isReadableStream: stat.isReadableStream,

'use strict';
var stream = require('stream');
var util = require('util');

@@ -50,4 +51,16 @@ /////////////////////////////////////

function formatError(error, level) {
var names = ['BatchError', 'PageError', 'SequenceError'];
if (error instanceof Error) {
if (names.indexOf(error.name) === -1) {
return '[' + error.name + ': ' + error.message + ']\n' + getStack(error, level);
} else {
return error.toString(level);
}
}
return util.inspect(error);
}
module.exports = {
getStack: getStack,
formatError: formatError,
isPromise: isPromise,

@@ -54,0 +67,0 @@ isReadableStream: isReadableStream,

{
"name": "spex",
"version": "1.0.5",
"version": "1.0.6",
"description": "Specialized Promise Extensions",

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

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