Messages
Topics
Lists
Groups
Marketplace
Jobs
Barney Baumbach
11 months ago
Clamp a number
$ npm install math-clamp
import mathClamp from 'math-clamp'; mathClamp(1, {minimum: 2, maximum: 4}); //=> 2
Author: SindresorhusSource Code: https://github.com/sindresorhus/math-clamp License: MIT license
#node #nodejs #math