I added clamp(value, min, max) to math.js. It returns value limited to [min, max] and throws a RangeError when min > max. It has a JSDoc block, which the House style check in checks.yml requires, and it's added to the exports. test.js now has tests for a value inside the range, below it, above it, min == max, and the min > max error. node test.js passes locally. I did not run the House style check itself.
The new function and its export edit sit just above the module.exports line. PRs #5, #12 and #14 also edit that line in math.js, so whichever merges second will probably need a small conflict resolution there.