interference
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

interference2

NPM version NPM downloads styled with prettier Dependencies Status

Custom error factory for microservices with HTTP code and internal type props Edit

Install

npm install interference

Usage

import Interference, { isInterference } from 'interference'
 
const err = Interference({ message: 'Good news everyone', type: 'FUTURAMA' })
 
if (isInterference(err) && err.type === 'FUTURAMA') {
  console.log('We have a special delivery today')
}

Factory Signature

({ message: string, type?: string, details?: any, code?: number }): Interference

Referenct to < es6 target

Extending built-ins Error

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i interference

    Weekly Downloads

    1

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    7.99 kB

    Total Files

    6

    Last publish

    Collaborators

    • fox1t
    • nucleodebot
    • tehkapa