Socket
Socket
Sign inDemoInstall

extendable-error

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    extendable-error

A simple extendable error class that extends Error.


Version published
Weekly downloads
637K
increased by2.6%
Maintainers
1
Install size
7.28 kB
Created
Weekly downloads
 

Readme

Source

Extendable Error Build Status

A simple abstract extendable error class that extends Error, which handles the error name, message and stack property.

Install

npm install extendable-error --save

Usage

import ExtendableError from 'extendable-error';

class SomeError extends ExtendableError {
  constructor(
    message: string,
    public code: number
  ) {
    super(message);
  }
}

let someError = new SomeError('Some error', 0x0001);

License

MIT License.

FAQs

Last updated on 15 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc