Skip to content

pelevesque-node/wrap-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status JavaScript Style Guide

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

About

Wraps a number inside a range.

Resources

License

Stars

Watchers

Forks

Packages

No packages published