Skip to content

andreruffert/closest-number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

closest-number

Test status npm version npm

Find the closest number out of an array to a specific value

Install

$ npm i closest-number

Usage

import closestNumber from 'closest-number';

closestNumber([10, 20, 30], 12);
// => 10

License

MIT © André Ruffert

About

🔢 Find the closest number out of an array to a specific value

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •