0.0.5 • Published 4 years ago

@itsjonq/is v0.0.5

Weekly downloads
5,745
License
MIT
Repository
github
Last release
4 years ago

💡 is

Build Status codecov Bundle size

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