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

@dvpnt/errors

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dvpnt/errors - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

23

index.js
const _ = require('underscore');
const defaultMessage = 'Error has occured';
const defaultMessage = 'Error has occurred';
const defaultUserMessage = 'Произошла ошибка';

@@ -91,12 +91,15 @@

exports.errorsCreator = (obj) => ({name, Parent = ServerError, ...params}) => {
obj[name] = class extends Parent {
constructor(constructorParams) {
super({
...params,
...constructorParams
});
}
};
exports.create = ({Parent = ServerError, ...params}) => class extends Parent {
constructor(constructorParams) {
super({
...params,
...constructorParams
});
}
};
exports.errorsCreator = (obj) => ({name, ...params}) => {
obj[name] = exports.create(params);
Object.defineProperty(obj[name], 'name', {

@@ -103,0 +106,0 @@ value: name,

{
"name": "@dvpnt/errors",
"version": "2.1.0",
"version": "2.2.0",
"description": "basic errors for node.js",

@@ -5,0 +5,0 @@ "main": "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