An open API service indexing awesome lists of open source software.

https://github.com/front/math-bound

Set boundaries to a number.
https://github.com/front/math-bound

Last synced: 4 months ago
JSON representation

Set boundaries to a number.

Awesome Lists containing this project

README

          

# Math.bound() & Number.prototype.bound()
Set boundaries to a number. The powers of Math.min() and Math.max() combined!

## Syntax
```
Math.bound(x, min, max)
```
or on a number:
```
x.bound(min, max)
```

## Parameters
- _x_ - a number
- _min_ - minimum value
- _max_ - maximum value

## Install
```
$ npm install math-bound
```

## License
MIT © Frontkom