# @alidatorjs/is-less-than

> Tiny function to validate if a value is less than other

Latest version **1.0.0** (published 2018-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @alidatorjs/is-less-than
pnpm add @alidatorjs/is-less-than
yarn add @alidatorjs/is-less-than
bun add @alidatorjs/is-less-than
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-08-12 |
| First published | 2018-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Víctor García |
| Maintainers | gc-victor |
| Keywords | alidator, validator, validation, javascript, library |

## Links

- npm: https://www.npmjs.com/package/@alidatorjs/is-less-than
- Repository: https://github.com/gc-victor/alidatorjs/tree/master/packages/is-less-than
- npm.io page: https://npm.io/package/@alidatorjs/is-less-than

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-08-12

## README

# is-less-than

Tiny function, compatible with Alidator.js, to validate if a value is less than other.

## Install

You can use npm or yarn to install it.

`$ npm install --save @alidatorjs/is-less-than`

`$ yarn add @alidatorjs/is-less-than`

Then with a module bundler like rollup or webpack, use as you would anything else:

```
// using ES6 modules
import { isLessThan } from '@alidatorjs/is-less-than'

// using CommonJS modules
var { isLessThan } = require('@alidatorjs/is-less-than')
```

## Usage

Is as easy as define an array with the validations.

```
import { validator } from '@alidatorjs/validator';
import { isLessThan } from '@alidatorjs/is-less-than';

const isValid = validator([
    isLessThan(0, 1),
    isLessThan(1, 2),
    isLessThan(2, 3),
]).every; // true

const errors = validator([
    [isLessThan(1, 0), () => 'Error 1'],
    [isLessThan(1, 2), () => 'Error 2'],
    [isLessThan(3, 2), () => 'Error 3'],
]).errors; // ['Error 1', 'Error 3']
```

## License

[MIT License]((https://github.com/gc-victor/alidatorjs/blob/master/LICENSE.md))

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