# of

> type checking

Latest version **1.0.0** (published 2015-01-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install of
pnpm add of
yarn add of
bun add of
```

## 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.0 |
| Published | 2015-01-25 |
| First published | 2014-10-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Fergus Ruston |
| Maintainers | ergusto |

## Links

- npm: https://www.npmjs.com/package/of
- Repository: https://github.com/ergusto/of
- Issues: https://github.com/ergusto/of/issues
- npm.io page: https://npm.io/package/of

## Recent versions

- 1.0.0 (latest) — 2015-01-25
- 0.0.11 — 2014-10-18
- 0.0.10 — 2014-10-18
- 0.0.9 — 2014-10-18
- 0.0.8 — 2014-10-17
- 0.0.7 — 2014-10-17
- 0.0.4 — 2014-10-13
- 0.0.3 — 2014-10-12
- 0.0.2 — 2014-10-12
- 0.0.1 — 2014-10-12

## README

##of

type checking

check type of value. returns capitalised name of type. e.g., 'Object', 'Function', 'Array':

```javascript
of.type(value);
```

returns true if value is an element, otherwise false:

```javascript
of.element(value);
```

returns true if value is a string, otherwise false:

```javascript
of.string(value);
```

returns true if value is an array, otherwise false:

```javascript
of.array(value);
```

returns true if value is an object, otherwise false:

```javascript
of.object(value);
```

returns true if value is a function, otherwise false:

```javascript
of['function'](value);
```

returns true if value is a boolean, otherwise false:

```javascript
of.boolean(value);
```

returns true if value is a number, otherwise false:

```javascript
of.number(value);
```

returns true if value is undefined, otherwise false:

```javascript
of['undefined'](value);
```

returns true if value is an arguments array, otherwise false:

```javascript
of['arguments'](value);
```

returns true if value is a regex, otherwise false:

```javascript
of.regex(value);
```

returns true if value is null, otherwise false:

```javascript
of['null'](value);
```

returns true if value is a date object, otherwise false:

```javascript
of.date(value);
```

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