UNPKG

stringencoding

Version:

Encode to/from Typed Array buffers

14 lines (10 loc) 347 B
/** * @param {number} a The number to test. * @param {number} min The minimum value in the range, inclusive. * @param {number} max The maximum value in the range, inclusive. * @return {boolean} True if a >= min and a <= max. */ function inRange(a, min, max) { return min <= a && a <= max; } module.exports = inRange;