check-fn

0.0.1 • Public • Published

check-fn

npm version install size npm downloads

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 --save

Important

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); 
// true

checkBigInt

checkBigInt(42n); 
// true

checkStr

checkStr("foo"); 
// true

checkBool

checkBool(true); 
// true

checkSym

checkSym(Symbol()); 
// true

checkUnd

let bar; 
checkUnd(bar); 
// true

checkObj

checkObj({"rainbow": "🌈"}); 
// true

checkFn

const bazz = () => { console.log("🦄") }
checkFn(bazz); 
// true

Congratulations You Can make your Code even shorter than before.

LICENSE

MIT License

Package Sidebar

Install

npm i check-fn

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

3.52 kB

Total Files

3

Last publish

Collaborators

  • lf32