{"id":20502912,"url":"https://github.com/evandrolg/find-by-words","last_synced_at":"2025-06-14T19:34:17.528Z","repository":{"id":57236190,"uuid":"81030680","full_name":"EvandroLG/find-by-words","owner":"EvandroLG","description":"A solution for finding words started by a string. It works well on both front-end and back-end.","archived":false,"fork":false,"pushed_at":"2017-02-14T00:25:14.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-09T13:55:43.155Z","etag":null,"topics":["algorithm","binary-search","performace","search"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvandroLG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-05T23:47:36.000Z","updated_at":"2018-02-28T20:47:54.000Z","dependencies_parsed_at":"2022-08-23T16:20:15.238Z","dependency_job_id":null,"html_url":"https://github.com/EvandroLG/find-by-words","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EvandroLG/find-by-words","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Ffind-by-words","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Ffind-by-words/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Ffind-by-words/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Ffind-by-words/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvandroLG","download_url":"https://codeload.github.com/EvandroLG/find-by-words/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvandroLG%2Ffind-by-words/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259870916,"owners_count":22924591,"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":["algorithm","binary-search","performace","search"],"created_at":"2024-11-15T19:28:26.588Z","updated_at":"2025-06-14T19:34:17.487Z","avatar_url":"https://github.com/EvandroLG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# find-by-words\nA solution for finding words started by a string. It works well on both front-end and back-end.\n\n## How does it work?\nThis implementation is inspired by the [binary search algorithm](https://en.wikipedia.org/wiki/Binary_search_algorithm). Like the famous algorithm, this solution uses the divide-and-conquer strategy and when it finds the first item, it searches for items on the left and right, stopping the loop when the first attempt fails.\n\n## Installation\n```shell\nnpm install find-by-words\n```\n\n## Parameters\n* **wordsList** \u003ccode\u003eArray\u003c/code\u003e\n* **word** \u003ccode\u003eString\u003c/code\u003e\n* **caseSensitive** \u003ccode\u003eBoolean\u003c/code\u003e (\u003ccode\u003efalse\u003c/code\u003e by default)\n\n## How to use?\n```js\nfindByWords(['python', 'ruby', 'java', 'javascript', 'lua'], 'Java', true);\n// output: ['java', 'javascript']\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevandrolg%2Ffind-by-words","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevandrolg%2Ffind-by-words","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevandrolg%2Ffind-by-words/lists"}