@itsjonq/is
v0.0.5
Published
A tiny type checker
Downloads
4,735
Maintainers
Readme
💡 is
A tiny type checker
is
is a simple sub 400B type checking library for JavaScript.
For a more feature-packed version, check out @sindresorhus/is.
Table of Contents
Installation
npm install @itsjonq/is
Usage
import is from '@itsjonq/is';
is.string('Hello');
// true
const fn = () => 'Nope';
is.string(fn);
// false
is.function(fn);
// true
is.object(fn);
// true
is.plainObject(fn);
// false
Supported types
is.array
is.blob
is.boolean
is.defined
is.file
is.function
is.map
is.null
is.number
is.object
is.plainObject
is.regExp
is.string
is.symbol
is.undefined
is.weakMap