1.0.4 • Published 2 years ago
vlds v1.0.4
Valids
A type validator
Example
Create a number type validator
const NumberValidator = obj =>
typeof obj === 'number'
|| obj instanceof Number
|| !isNaN(obj);
const Num = require("vlds").type(NumberValidator);
// Validate an object
const one = new Num(1);
console.log(one); // 1
1.0.2
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2-alpha.2
2 years ago
1.0.2-alpha
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago