@pnmasharov/type-check
v1.0.1
Published
A small set of functions to check value against a specific type
Downloads
5
Maintainers
Readme
Type-check
A small set of functions to check your values for a specific type
- Installation
npm install @pnmasharov/type-check
- Usage
import {
checkIsString,
checkIsNumber,
checkIsNumberPositive,
checkIsNumberNegative,
checkIsZero,
checkIsFinite,
checkIsArray,
checkIsObject,
checkIsNull,
checkIsUndefined,
checkIsFunction,
} from "@pnmasharov/type-check"
// or
// const { checkIsNumber } = require("@pnmasharov/type-check")
let amount = 13,2
if (checkIsNumber(amount)) {
// here you can work with your number
}