Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binarysjs

A simple npm library to make binary search with javascript

Github Top Language Github language count Size GitHub

ℹ️ How to use

  $ npm install binarysjs
  # $ yarn add binarysjs
  const { getIndex } = require('binarysjs');

  const index = getIndex(target, array, startIndex?, endIndex?)
  // target = The value you want to find
  // array = The array you want to search in
  // startIndex && endIndex = optional parameters you don't want to check the whole array

Return values

  • Any number bigger than or equal to zero: Found value index
  • -1: Value not found

🚀 Techs

  • Node.js
  • Typescript
  • Jest

📝 License

This project is under the MIT license. See the LICENSE for more information.

Made with ♥️ by Giovani Farias 👋 Get in touch!

About

binary js library

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages