Socket
Socket
Sign inDemoInstall

@vitrical/utils

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitrical/utils - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

20

express.js

@@ -9,3 +9,3 @@ "use strict";

return next();
if ((0, api_1.isApiError)(err)) {
if (err instanceof api_1.ApiError) {
console.warn(err.message);

@@ -17,17 +17,17 @@ console.warn(err.stack);

});
return;
}
else if ((0, validation_1.objectHasProperty)(err, 'message')) {
else if (typeof err === 'object' && 'message' in err && 'stack' in err) {
console.error(err.message);
console.error(err.stack);
res.status(500).send({
msg: err.message
msg: err.message + ''
});
return;
}
else {
console.error(err);
res.status((0, api_1.isApiError)(err) ? err.status : 500).send({
msg: 'Unknown Error',
err: err
});
}
console.error(err);
res.status(500).send({
msg: 'Unknown Error',
err: err
});
};

@@ -34,0 +34,0 @@ exports.handleExpressError = handleExpressError;

{
"name": "@vitrical/utils",
"version": "1.0.14",
"version": "1.0.15",
"description": "Collection of useful functions and typings",

@@ -8,3 +8,3 @@ "main": "index.js",

"build": "tsc --project tsconfig.json",
"test": "ts-node validation.ts"
"clean": "rm *.ts"
},

@@ -11,0 +11,0 @@ "repository": {

@@ -14,3 +14,3 @@ {

"include": ["**/*.ts"],
"exclude": ["node_modules"]
"exclude": ["node_modules", "**/node_modules"]
}

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