@fastify/error
Advanced tools
Comparing version
{ | ||
"name": "@fastify/error", | ||
"version": "2.0.0", | ||
"version": "3.0.0", | ||
"description": "A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
"@types/node": "^17.0.0", | ||
"ava": "^3.9.0", | ||
"ava": "^4.0.1", | ||
"standard": "^17.0.0", | ||
@@ -31,0 +31,0 @@ "tsd": "^0.20.0", |
@@ -1,6 +0,5 @@ | ||
# fastify-error | ||
# @fastify/error | ||
 | ||
[](https://www.npmjs.com/package/fastify-error) | ||
[](https://snyk.io/test/github/fastify/fastify-error) | ||
[](https://www.npmjs.com/package/@fastify/error) | ||
[](https://standardjs.com/) | ||
@@ -12,3 +11,3 @@ | ||
``` | ||
npm i fastify-error | ||
npm i @fastify/error | ||
``` | ||
@@ -30,3 +29,3 @@ | ||
```js | ||
const createError = require('fastify-error') | ||
const createError = require('@fastify/error') | ||
const CustomError = createError('ERROR_CODE', 'message') | ||
@@ -38,3 +37,3 @@ console.log(new CustomError()) | ||
```js | ||
const createError = require('fastify-error') | ||
const createError = require('@fastify/error') | ||
const CustomError = createError('ERROR_CODE', 'Hello %s') | ||
@@ -41,0 +40,0 @@ console.log(new CustomError('world')) // error.message => 'Hello world' |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9973
-8.02%43
-2.27%1
Infinity%