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 1.0.0 to 1.0.1

4

error.js

@@ -48,4 +48,4 @@ 'use strict'

function buildCode (opts) {
opts.actionCode = opts.actionCode || ''
opts.objectCode = opts.objectCode || ''
opts.actionCode = opts.actionCode === 0 ? 0 : opts.actionCode || ''
opts.objectCode = opts.objectCode === 0 ? 0 : opts.objectCode || ''
return +('' + opts.typeCode + opts.objectCode + opts.actionCode)

@@ -52,0 +52,0 @@ }

@@ -29,6 +29,7 @@ 'use strict'

var actCode = CONFIG.get('action', arr[1])
if (!isCode(objCode)) throw new Error('unrecognized error object')
if (!isCode(actCode)) throw new Error('unrecognized error action')
codeObj.objectCode = objCode
codeObj.actionCode = actCode
if (isCode(objCode) && isCode(actCode)) {
codeObj.objectCode = objCode
codeObj.actionCode = actCode
}
}

@@ -62,4 +63,4 @@ codeObj.type = type

}
if (objectCode !== undefined) codeObj.objectCode = objectCode
if (objectCode !== undefined) codeObj.actionCode = actionCode
codeObj.objectCode = objectCode || 0
codeObj.actionCode = actionCode || 0
CONFIG.typeMap[name] = codeObj

@@ -66,0 +67,0 @@ }

{
"name": "node-code-error",
"version": "1.0.0",
"version": "1.0.1",
"description": "define node error with code",

@@ -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