npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

binary-search-async

1.1.1

@dominictarr

npmHomeRepoSnykSocket
Downloads:258
$ npm install binary-search-async
DailyWeeklyMonthlyYearly

binary-search

adapted from darkskyapp's binary-search

example


var search = require('binary-search-async')

search(function get (i, cb) {
  asyncLookup(i, cb)
}, target, compare, lo, hi, cb)

All arguments are mandatory. this assumes you are using integer indexes.

note: hi is the highest index, not the length! highest index is length - 1!

License

To the extent possible by law, The Dark Sky Company, LLC has waived all copyright and related or neighboring rights to this library.