New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

oslllo-validator-exception

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oslllo-validator-exception

All in one Javascript validator but throws an exception on false

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Cover Image

CI/Test npm Coverage Status

Documentation, Installation, and Usage Instructions

This package is a wrapper for oslllo-validator therefore shares the same documentaion with it.

See the full installation and usage documentation HERE.

The Objective

Create an all in one Javascript validator that throws an exception on false.

The Problem / Why This Was Created

It was requested HERE

Usage Examples

Check if value is actual NaN
const assert = require("oslllo-validator-exception");

assert.actualNaN(NaN); // => True
assert.actualNaN(null); // => Throws Error
assert.actualNaN(undefined); // => Throws Error
Check if value is actual NaN but throw an exception with a custom message on false
const assert = require("oslllo-validator-exception");

assert.actualNaN(null, assert.msg("Invalid UUID")); // => Throws Error with custom message "Invalid UUID"

Return false instead

If you want to return false instead of an exception then check out oslllo-validator HERE


Keywords

FAQs

Package last updated on 05 Sep 2021

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc