0.0.1 • Published 3 years ago
check-fn v0.0.1
check-fn
What is dis?
A list of bool functions that checks for type of a JS variable .
This uses the strict equality operator (===) while checking.
Content
Installation
npm i check-fn --saveImportant
Add this line at your top of the javascript file and import any function you want.
import {
checkNum,
checkBigInt,
checkStr,
checkBool,
checkSym,
checkUnd,
checkObj,
checkFn
} from 'check-fn';Usage
Make use of the following functions in your code.
checkNum
checkNum(42);
// truecheckBigInt
checkBigInt(42n);
// truecheckStr
checkStr("foo");
// truecheckBool
checkBool(true);
// truecheckSym
checkSym(Symbol());
// truecheckUnd
let bar;
checkUnd(bar);
// truecheckObj
checkObj({"rainbow": "🌈"});
// truecheckFn
const bazz = () => { console.log("🦄") }
checkFn(bazz);
// trueCongratulations You Can make your Code even shorter than before.
LICENSE
MIT License