Mavis

JSON →
library 2.0.0 ·javascript maintenance
verified Jun 4, 2026

Mavis is a thorough JavaScript type-checking library that returns precise string labels for values, surpassing typeof. Current stable version is 2.0.0 (last released in 2016). It has minimal dependencies and works in both Node.js and browsers. Unlike constructor-based checkers, Mavis uses strings for forward/backward compatibility. It distinguishes between arrays, objects, functions, generators, numbers, strings, errors, HTML elements, and more. Includes a type.is() method for comparisons and array-of-types matching. The library is very lightweight but no longer actively maintained.