UNPKG

mout

Version:

Modular Utilities

10 lines (7 loc) 192 B
/** * Check if value is close to target. */ function isNear(val, target, threshold){ return (Math.abs(val - target) <= threshold); } module.exports = isNear;