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

@magic/error

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magic/error - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "@magic/error",
"version": "0.0.3",
"version": "0.0.4",
"author": "Wizards & Witches",

@@ -5,0 +5,0 @@ "description": "errors for @magic",

@@ -37,9 +37,9 @@ # @magic/error

err = error('message', 'name')
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E' }
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E', msg: 'message' }
err = error('message')
// Error { message: 'message', name: 'Unknown', code: 'E_UNKNOWN', type: 'E' }
// Error { message: 'message', name: 'Unknown', code: 'E_UNKNOWN', type: 'E', msg: 'message' }
err = error(new Error('message'))
// Error { message: 'message', name: 'Error', code: 'E_UNKNOWN', type: 'E' }
// Error { message: 'message', name: 'Error', code: 'E_UNKNOWN', type: 'E', msg: 'message' }

@@ -51,4 +51,14 @@ err = error('message', 'name with spaces')

// code: 'E_NAME_WITH_SPACES',
// type: 'E'
// type: 'E',
// msg: 'message',
// }
err = error(['message', 'name', 'T'])
// Error { message: 'message', name: 'name', code: 'T_NAME', type: T, msg: 'message' }
err = error(['message'], 'name', 'T')
// Error { message: 'message', name: 'name', code: 'T_NAME', type: T, msg: 'message' }
err = error(['message', 'name1'], 'name2', 'T')
// Error { message: 'message', name: 'name1', code: 'T_NAME1', type: T, msg: 'message' }
```

@@ -62,11 +72,11 @@

err = error('message', 'name')
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E' }
// Error { message: 'message', name: 'name', code: 'E_NAME', type: 'E', msg: 'message' }
// warnings:
err = error('message', 'name', 'W')
// Error { message: 'message', name: 'name', code: 'W_NAME', type: 'W' }
// Error { message: 'message', name: 'name', code: 'W_NAME', type: 'W', msg: 'message' }
// debug:
err = error('message', 'name', 'D')
// Error { message: 'message', name: 'name', code: 'D_NAME', type: 'D' }
// Error { message: 'message', name: 'name', code: 'D_NAME', type: 'D', msg: 'message' }
```

@@ -90,3 +100,7 @@

#### 0.0.4 - unreleased
#### 0.0.4
* err.msg is no === err.message
* first argument can be an array of [message, name, type]
#### 0.0.5 - unreleased
...

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