{"id":19238223,"url":"https://github.com/olical/binary-search","last_synced_at":"2025-10-29T16:17:20.227Z","repository":{"id":24747469,"uuid":"28160138","full_name":"Olical/binary-search","owner":"Olical","description":"Binary search implementation in JavaScript born from a couple of my blog posts","archived":false,"fork":false,"pushed_at":"2016-01-18T16:33:33.000Z","size":6,"stargazers_count":25,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T08:53:26.732Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://oli.me.uk/2014/12/17/revisiting-searching-javascript-arrays-with-a-binary-search/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Olical.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-17T23:30:20.000Z","updated_at":"2025-04-03T15:31:10.000Z","dependencies_parsed_at":"2022-07-24T02:32:16.381Z","dependency_job_id":null,"html_url":"https://github.com/Olical/binary-search","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olical%2Fbinary-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olical%2Fbinary-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olical%2Fbinary-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olical%2Fbinary-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Olical","download_url":"https://codeload.github.com/Olical/binary-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250008215,"owners_count":21359949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T16:29:51.302Z","updated_at":"2025-10-29T16:17:20.134Z","avatar_url":"https://github.com/Olical.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# binary-search\n\nThis is a binary search implementation in JavaScript that was born from a couple of [my blog posts][posts]. It focusses on heavy generative testing and benchmarks to make sure it works and runs fast.\n\n## Usage\n\nInstall the package, `olical-binary-search`, and use it like this.\n\n```javascript\nimport binarySearch from 'olical-binary-search'\n\nconst items = [10, 20, 30, 40, 50]\n\nbinarySearch(items, 30) // Yields: 2\nbinarySearch(items, 100) // Yields: -1\n```\n\n## License\n\nThis repository is released under [the unlicense][], feel free to do whatever you want. You can find the full license within the `UNLICENSE` file.\n\n\u003eThis is free and unencumbered software released into the public domain.\n\u003e\n\u003eAnyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.\n\n[the unlicense]: http://unlicense.org/\n[posts]: http://oli.me.uk/2014/12/17/revisiting-searching-javascript-arrays-with-a-binary-search/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folical%2Fbinary-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folical%2Fbinary-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folical%2Fbinary-search/lists"}