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

error

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

8

package.json
{
"name": "error",
"version": "3.0.0",
"version": "4.0.0",
"description": "Custom errors",

@@ -20,4 +20,6 @@ "keywords": [],

"dependencies": {
"xtend": "~2.1.1",
"string-template": "~0.1.3"
"assert": "^1.1.1",
"camelize": "^0.1.2",
"string-template": "~0.1.3",
"xtend": "~2.1.1"
},

@@ -24,0 +26,0 @@ "devDependencies": {

@@ -0,1 +1,3 @@

var assert = require("assert/")
var camelize = require("camelize")
var template = require("string-template")

@@ -7,4 +9,13 @@ var extend = require("xtend/mutable")

function TypedError(args) {
assert(args, "args is required");
assert(args.type, "args.type is required")
assert(args.message, "args.message is required")
var message = args.message
if (args.type && !args.name) {
var errorName = camelize(args.type) + "Error"
args.name = errorName[0].toUpperCase() + errorName.substr(1)
}
return function createError(opts) {

@@ -11,0 +22,0 @@ var result = new Error()

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