https://github.com/itsjonq/is
💡 A tiny type checker for JavaScript
https://github.com/itsjonq/is
check check-type checker is javascript plain-object tiny type type-check type-checker types
Last synced: 9 months ago
JSON representation
💡 A tiny type checker for JavaScript
- Host: GitHub
- URL: https://github.com/itsjonq/is
- Owner: ItsJonQ
- License: mit
- Created: 2019-12-01T00:10:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-05T10:34:30.000Z (over 3 years ago)
- Last Synced: 2025-08-31T11:32:03.500Z (10 months ago)
- Topics: check, check-type, checker, is, javascript, plain-object, tiny, type, type-check, type-checker, types
- Language: JavaScript
- Homepage:
- Size: 4.42 MB
- Stars: 6
- Watchers: 0
- Forks: 1
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 💡 is
[](https://travis-ci.org/ItsJonQ/is)
[](https://codecov.io/gh/ItsJonQ/is)
[](https://bundlephobia.com/result?p=@itsjonq/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](https://github.com/sindresorhus/is).
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Supported types](#supported-types)
## Installation
```
npm install @itsjonq/is
```
## Usage
```js
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`