Package Exports
- @pelevesque/wrap-number
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@pelevesque/wrap-number) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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