🐡 Type checker
- Check primitive or object type of a variable in one function.
- Check whether a variable is numeric in different strictness (and different overhead).
- Parse variable to boolean.
- Check type of an array.
- Lightweight and fast.
- ES-module support.
$ npm install @typen/<tool-name>
typ | shorthand for Object.prototype.toString.call() | |
bool | parse input to boolean, e.g. 'false' be parsed to false | |
nullish | check if input is null or undefined | |
num-loose | isNumeric in a loose check | |
num-strict | isNumeric in a stricter check | |
vector-type | check type of an array | |
enum-data-types | types returned by typeof | |
enum-object-types | types returned by Object.prototype.toString.call() | |