Socket
Book a DemoInstallSign in
Socket

not-found-error

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

not-found-error

A simple NotFoundError constructor

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

NotFoundError

When you've lost something

Dependency Status devDependency Status

An exception for use in certain situations (e.g. to signal HTTP 404 error). Created because of a need for a cross-package standard exception.

Getting started

Install the package with this command:

npm install not-found-error --save

Usage

// Import ES6-style
import NotFoundError from 'not-found-error';

// Or CommonJS-style
const NotFoundError = require('not-found-error');

// Then just use like this:
throw new NotFoundError();

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style.

License

Copyright (c) 2016 Rafał Ruciński. Licensed under the WTFPL license.

Keywords

error

FAQs

Package last updated on 30 Apr 2016

Did you know?

Socket

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