Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

closest-number

1.0.2 • Public • Published

closest-number

Build Status npm version

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

Install

$ npm i closest-number -S

Usage

const closestNumber = require('closest-number');
 
closestNumber([10, 20, 30], 12);
// => 10

License

MIT © André Ruffert

install

npm i closest-number

Downloadsweekly downloads

10

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability