@pelevesque/wrap-number
v0.0.5
Published
Wraps a number inside a range.
Downloads
12
Maintainers
Readme
wrap-number
Wraps a number inside a range.
Node Repository
https://www.npmjs.com/package/@pelevesque/wrap-number
Installation
npm install @pelevesque/wrap-number
Tests
Command | Description
---------------------------- | ------------
npm test
or npm run test
| All Tests Below
npm run cover
| Standard Style
npm run standard
| Coverage
npm run unit
| Unit Tests
Usage
const wrapNumber = require('@pelevesque/wrap-number')
const num = 11
const rangeMin = -10
const rangeMax = 10
const result = wrapNumber(num, rangeMin, rangeMax)
// result === -10