@fastify/error
Advanced tools
Comparing version 2.0.0 to 3.0.0
{ | ||
"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 | ||
![CI](https://github.com/fastify/fastify-error/workflows/CI/badge.svg) | ||
[![NPM version](https://img.shields.io/npm/v/fastify-error.svg?style=flat)](https://www.npmjs.com/package/fastify-error) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-error/badge.svg)](https://snyk.io/test/github/fastify/fastify-error) | ||
[![NPM version](https://img.shields.io/npm/v/@fastify/error.svg?style=flat)](https://www.npmjs.com/package/@fastify/error) | ||
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9973
43
1