Detect and debug Type Errors over 35 types of data in less than 6 KB. Also classifies data in 9 groups.
type().is
typeof
type().isNumber
type().isFunction
type().isTruthy
type().isNullish
type().kinds
Made for developers who are always looking for the right type
With the typeErrorIf
function you can easily throw and catch errors
Save time and head scratching by doing specific type checking
Reduce mistakes and new “open issues”, feel secure of what type of data you can expect
The data you verify with the type
function by default will be readonly
npm install typelib-js
// import type from "typelib-js"
// const type = require("typelib-js")
yarn add typelib-js
// import type from "typelib-js"
// const type = require("typelib-js")
pnpm install typelib-js
// import type from "typelib-js"
// const type = require("typelib-js")
git clone https://github.com/schemetastic/typelib-js.git
// <script src="dist/typelib.min.js"> <script>
// import type from "./dist/typelib.es.min.js"