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

node-code-error

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-code-error - npm Package Compare versions

Comparing version 0.1.3 to 0.1.31

6

index.js

@@ -26,3 +26,3 @@ 'use strict'

function Ctor (msg, code, orignalError) {
if (Errors._useMsgCode) {
if (Errors._useMsgCode && !util.isNumberLike(code)) {
orignalError = code

@@ -54,4 +54,4 @@ code = Errors.ensureCode(msg)

arr.forEach(function (item, ind) {
var codePart = maps[ind][item] || 0
code += codePart
var codePart = maps[ind][item]
if (codePart !== undefined) code += codePart
})

@@ -58,0 +58,0 @@ return +code

{
"name": "node-code-error",
"version": "0.1.3",
"version": "0.1.31",
"description": "define node error with code",

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

@@ -7,9 +7,2 @@ 'use strict'

// Errors.extend('system', 500, 100, 0)
// Errors.extend('internal', 500, 101, 0)
// Errors.extend('param', 400, 103, 0)
// Errors.extend('api', 400, 104)
// Errors.extend('jwt', 400, 105)
// Errors.extend('oauth2', 400, 106)
it('extend', function () {

@@ -16,0 +9,0 @@ Errors.extend('internal', 500, 101, 0)

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