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