A small package with 2.11 kb unpacked size to validate basics stuffs.
npm i rahul-validate
const rahulValidate = require('rahul-validate');
OR
import rahulValidate from "rahul-validate";
if(rahulValidate.isEmail("abc@gmail.com"))
console.log("Yes");
else console.log("No");
if(rahulValidate.isEmail("abc@gmail.com"))
console.log("Yes");
else console.log("No");
if(rahulValidate.isStrongPassword("Team#2ok.com"))
console.log("Yes");
else console.log("No");
if(rahulValidate.isText("abc"))
console.log("Yes");
else console.log("No");
if(rahulValidate.isNum("abc"))
console.log("Yes");
else console.log("No");
// Validate dd/mm/yyyy or dd-mm-yyyy format
if(rahulValidate.isDate("12-15-2020"))
console.log("Yes");
else console.log("No");