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

1.0.8 • Public • Published

is-type

npm version build status issue tracker pull requests

is-type is a collection of functions that return whether a value is a certain type.

It is 280 bytes (173 gzipped).

Installation

npm install @jsxtools/is-type

Usage

import { isArray, isBoolean, isNumber, isObject, isString } from '@jsxtools/is-type';

isArray(''); // false
isArray([]); // true
isArray({}); // false

isBoolean(false); // true
isBoolean(0); // false
isBoolean(!0); // true

isNumber(0); // true
isNumber(Infinity); // false
isNumber(NaN); // false
isNumber('0'); // false

isObject({}); // true
isObject([]); // true
isObject(''); // false

isString(''); // true
isString([]); // false
isString({}); // false

Readme

Keywords

none

Package Sidebar

Install

npm i @jsxtools/is-type

Weekly Downloads

1

Version

1.0.8

License

CC0-1.0

Unpacked Size

10.3 kB

Total Files

7

Last publish

Collaborators

  • jonathantneal