# js-variable-type

> javascript 值类型判断

Latest version **1.0.5** (published 2019-11-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install js-variable-type
pnpm add js-variable-type
yarn add js-variable-type
bun add js-variable-type
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-11-01 |
| First published | 2019-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | fangfang.peng |

## Links

- npm: https://www.npmjs.com/package/js-variable-type
- npm.io page: https://npm.io/package/js-variable-type

## Recent versions

- 1.0.5 (latest) — 2019-11-01
- 1.0.4 — 2019-11-01

## README

# 区分Javascript变量值类型

## 用法

### 安装
```javascript
	npm install js-variable-type
```

```javascript
import {
	isObject,
	isArray,
	isString,
	isNumber,
	isNull,
	isUndefined,
	isDate,
	isRegExp,
	isBoolean,
	isFunction,
	isError
} from 'js-variable-type';

	console.log(`{} is Object ? -> ${isObject({})}`);
	console.log(`[] is Array ? -> ${isArray([])}`);
	console.log(`'string' is String ? -> ${isString('string')}`);
	console.log(`100 is Number ? -> ${isNumber(100)}`);
	console.log(`null is Null ? -> ${isNull(null)}`);
	console.log(`undefined is Undefined ? -> ${isUndefined(undefined)}`);
	console.log(`new Date() is isDate ? -> ${isDate(new Date())}`);
	console.log(`new RegExp() is RegExp ? -> ${isRegExp(new RegExp())}`);
	console.log(`true is Boolean ? -> ${isBoolean(true)}`);
	console.log(`() => {} is Funtion ? -> ${isFunction(this.onDialogRedirect)}`);
	console.log(`new Error() is Error ? -> ${isError(new Error('ddd'))}`);

```

---
_Source: https://npm.io/package/js-variable-type · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
