Socket
Book a DemoInstallSign in
Socket

valueerror

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

valueerror

ValueError, an instance of Error, for Node.js

0.0.2
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ValueError

npm version Build Status Coverage Status

ValueError, an instance of Error, for Node.js

Installation

npm install valueerror

Usage

Same as the Error constructor function. For example,

var ValueError = require('valueerror');
...
throw new ValueError('Input cannot have underscores');

The new is optional here. So the above code can be written as

throw ValueError('Input cannot have underscores');

Similarly, the ValueError can be used to check the instance like this

new ValueError() instanceof ValueError // true
new ValueError() instanceof Error      // true

Keywords

Error

FAQs

Package last updated on 29 Jan 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.