closest-number

1.0.3 • Public • Published

closest-number

CI status npm version

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

Readme

Keywords

Package Sidebar

Install

npm i closest-number

Weekly Downloads

6

Version

1.0.3

License

MIT

Unpacked Size

2.53 kB

Total Files

4

Last publish

Collaborators

  • andreruffert