Javascript library to easy test type of an value.
Returns true
if the type of the given value matches the expected, otherwise false
.
npm i --save @mesaquen/isit
or
yarn add @mesaquen/isit
import isIt from '@mesaquen/isit';
...
isIt.number(5); // true
isIt.undefined('some text'); // false
number
string
boolean
undefined
null
undefinedOrNull