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
false
Check if value is actual NaN but throw an exception with a custom message on const assert = require("oslllo-validator-exception");
assert.actualNaN(null, assert.msg("Invalid UUID")); // => Throws Error with custom message "Invalid UUID"
false
instead
Return If you want to return false
instead of an exception
then check out oslllo-validator
HERE