closest-number Find the closest number out of an array to a specific value Install $ npm i closest-number Usage const closestNumber = require('closest-number'); closestNumber([10, 20, 30], 12); // => 10 License MIT © André Ruffert