The Wayback Machine - https://web.archive.org/web/20200810160717/https://github.com/ItsJonQ/is
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

💡 is

Build Status Coverage Status 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
You can’t perform that action at this time.