# fi-is

> Small check library for Node.js and the browser

Latest version **4.0.0** (published 2019-12-30) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install fi-is
pnpm add fi-is
yarn add fi-is
bun add fi-is
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2019-12-30 |
| First published | 2016-04-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 <=12 |
| Dependencies | 0 |
| Unpacked size | 706.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | DOT |
| Maintainers | leonardo.ramos, stgogm |
| Keywords | fi, is, type, regex, string, number, object, email, phone, check, validation |

## Links

- npm: https://www.npmjs.com/package/fi-is
- Repository: https://github.com/finaldevstudio/fi-is
- Homepage: http://finaldevstudio.github.io/fi-is/
- Issues: https://github.com/finaldevstudio/fi-is/issues
- npm.io page: https://npm.io/package/fi-is

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2019-12-30
- 3.1.0 — 2019-12-20
- 3.0.2 — 2019-11-08
- 3.0.1 — 2019-10-29
- 3.0.0 — 2019-08-16
- 2.1.0 — 2019-06-13
- 2.0.0 — 2019-06-13
- 1.3.1 — 2018-12-07
- 1.3.0 — 2018-12-06
- 1.2.0 — 2017-03-10
- 1.1.5 — 2016-12-23
- 1.1.4 — 2016-12-19
- 1.1.3 — 2016-12-19
- 1.1.1 — 2016-04-13
- 1.1.0 — 2016-04-12
- … 1 more at https://npm.io/package/fi-is/versions

## README

# fi-is [![Build Status](https://travis-ci.org/dotstudio-io/fi-is.svg?branch=master)](https://travis-ci.org/dotstudio-io/fi-is)

A small general purpose check library with arithmetic, array, environments, object, presence, regexp, string, time and type check functions. Available for Node.js and the browser.

- No dependencies
- AMD, Node & browser ready

Originally meant as a drop-in replacement for and forked from [is.js](https://github.com/arasatasaygin/is.js).

### Usage
#### Node.js

Install with NPM:
```
npm install --save fi-is
```

Use in you application:
```js
const is = require('fi-is');

is.nodejs(); // true
is.number(0); // true
```

#### Browser
Install with Bower:
```
bower install --save fi-is
```

Include the non-minified script for testing and development:
```html
<script src="bower_components/fi-is/dist/fi-is.js"></script>
```

Or include the minified script for production:
```html
<script src="bower_components/fi-is/dist/fi-is.min.js"></script>
```

Or, better yet, bundle it with the rest of the scripts.

### Documentation
- [API](DOCUMENTATION.md)
- [Arithmetic checks](DOCUMENTATION.md#libarithmeticjs)
- [Array checks](DOCUMENTATION.md#libarrayjs)
- [Environment checks](DOCUMENTATION.md#libenvironmentjs)
- [Object checks](DOCUMENTATION.md#libobjectjs)
- [Presence checks](DOCUMENTATION.md#libpresencejs)
- [RegExp checks](DOCUMENTATION.md#libregexpjs)
- [String checks](DOCUMENTATION.md#libstringjs)
- [Time checks](DOCUMENTATION.md#libtimejs)
- [Type checks](DOCUMENTATION.md#libtypejs)

### Contributing
Please keep you code tidy and readable and document appropriately using the following schema:

```js
/**
 * Checks for awesomeness.
 *
 * @param {String} str It receives a string or whatever.
 *
 * @returns {Boolean} It must return a boolean.
 *
 * @example
 * is.awesome('fi-is'); // true
 * is.awesome(1); // false
 */
is.awesome = function (str) {
 return is.string(str) && str === 'fi-is';
};
```

If the method has more than one argument or it's unnecessary to include all of them, define the method's interfaces below it:

```js
// ...

is.awesome.api['not'];
```

To build browser versions (dist):
```
gulp dist
```

To run tests:
```
npm test
```

To update the documentation files:
```
gulp docs
```

One-liner:
`gulp && npm test`

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