# where-type

> ``` 1. judge assign data type 2. computed get assign data type 3. support import method: cjs and esm and iife ```

Latest version **1.2.15** (published 2023-03-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install where-type
pnpm add where-type
yarn add where-type
bun add where-type
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.15 |
| Published | 2023-03-16 |
| First published | 2021-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | lihaohao |
| Maintainers | lihh |
| Keywords | type, is-type, Number, String, Boolean |

## Links

- npm: https://www.npmjs.com/package/where-type
- Repository: https://github.com/a572251465/where-type
- Issues: https://github.com/a572251465/where-type/issues
- npm.io page: https://npm.io/package/where-type

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.15 (latest) — 2023-03-16
- 1.2.14 — 2022-04-24
- 1.2.13 — 2022-04-09
- 1.2.12 — 2022-04-01
- 1.2.11 — 2022-04-01
- 1.2.10 — 2022-04-01
- 1.2.9 — 2022-04-01
- 1.2.8 — 2022-04-01
- 1.2.7 — 2022-04-01
- 1.2.6 — 2022-04-01
- 1.2.3 — 2022-04-01
- 1.2.2 — 2022-04-01
- 1.2.1 — 2022-04-01
- 1.1.1 — 2021-10-23
- 1.1.0 — 2021-10-23
- … 1 more at https://npm.io/package/where-type/versions

## README

## where-type

#### introduce

```
  1. judge assign data type
  2. computed get assign data type
  3. support import method: cjs and esm and iife
```

#### install

```
  1. npm install where-type -S
  2. yarn add where-type -S
  3. pnpm install where-type -S
```

#### use

```javascript
const {isNumber, isString, getTypes} = require('where-type')
const _ = require("where-type");
isNumber(1) // true
isNumber('1') // false
isString('1') // true
getTypes(1) // [number]
getTypes([1, '1']) // [number, string]

// OR

import types, {isNumber} from 'where-type'

types.isNumber(1) // true
isNumber(1) // true
```

#### global api

```
  isNumber,
  isBoolean,
  isNull,
  isString,
  isObject,
  isUndefined,
  isFunction,
  isArray,
  isDate,
  isError,
  isRegExp,
  isSymbol,
  isMath,
  isJson,
  isEmpty,
  isEmptyString,
  getTypes
    parameter: string or array
    if parameter is any vlaue, return type is string[]
      getTypes('1') // [string]
    is parameter is array, Type is returned in an array 
      getTypes([1, '2', false]) // [number, string, boolean]
```

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