Necessarily Precedes Mischief

    @itsjonq/is
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.5 • Public • Published

    💡 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

    Install

    npm i @itsjonq/is

    DownloadsWeekly Downloads

    8,897

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    16.3 kB

    Total Files

    17

    Last publish

    Collaborators

    • avatar