Installation
npm install @kiryu/types.js
Usage
- Start by requiring types.js, then by using it's supported methods for checking the type.
const typesjs = require('@kiryu/types.js');
typesjs.boolean(1); // will return true.
- List of available types:
typesjs.undefined();
typesjs.null();
typesjs.NaN();
typesjs.boolean();
typesjs.number();
typesjs.string();
typesjs.bigInt();
typesjs.symbol();
typesjs.Object();
typesjs.Array();
typesjs.Map();
typesjs.Set();
typesjs.WeakMap();
typesjs.WeakSet();
typesjs.Date();