Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

limit-number

2.0.0 • Public • Published

limit-number

Travis Build Status AppVeyor Status Coverage Status Dependencies Greenkeeper badge

Limit a number between a min and max value.

Install

npm install limit-number

Usage

const limit = require('limit-number')
 
limit(0, 10, 5) // 5
limit(0, 10, 15) // 10
limit(0, 10, -5) // 0

Parameters

  • min {Number} Min number.
  • max {Number} Max number.
  • num {Number} Number.

Returns

  • {Number} Limited number.

install

npm i limit-number

Downloadsweekly downloads

2

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability