{"id":26787204,"url":"https://github.com/sagiavinash/partial-match","last_synced_at":"2026-04-29T18:33:49.232Z","repository":{"id":57319723,"uuid":"99312989","full_name":"sagiavinash/partial-match","owner":"sagiavinash","description":"a search util that gives match strength of a query against a sentence","archived":false,"fork":false,"pushed_at":"2017-10-11T07:15:49.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T04:01:52.218Z","etag":null,"topics":["algorithm","autocomplete","automation","javascript","npm-package","search"],"latest_commit_sha":null,"homepage":null,"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/sagiavinash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-04T06:52:44.000Z","updated_at":"2023-12-01T07:59:47.000Z","dependencies_parsed_at":"2022-08-25T21:00:54.206Z","dependency_job_id":null,"html_url":"https://github.com/sagiavinash/partial-match","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/sagiavinash%2Fpartial-match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagiavinash%2Fpartial-match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagiavinash%2Fpartial-match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sagiavinash%2Fpartial-match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sagiavinash","download_url":"https://codeload.github.com/sagiavinash/partial-match/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246180861,"owners_count":20736460,"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","autocomplete","automation","javascript","npm-package","search"],"created_at":"2025-03-29T12:18:47.860Z","updated_at":"2026-04-29T18:33:44.210Z","avatar_url":"https://github.com/sagiavinash.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Partial Match\n\n- Get fullly \u0026 partially matched strings for a given query\n- Primary use case being sorting autocomplete suggestions\n\n- Uses number of words matched as scoring algorithm\n- Need to implement index at which the word matched as secondary sorting algorithm\n\n## Usage\n\n```javascript\nvar partialMatchFactory = require('partial-match');\n\nvar partialMatch = partialMatchFactory({\n  caseInsensitive: true,\n  splitByTokens: ['-', '_'],\n});\n\nvar sentences = [\n  'hello-africa',\n  'world is round',\n  'hello world',\n  'our_world_is_a_beautiful_world',\n  '7 continents',\n];\n\nconsole.log(partialMatch.getSuggestedMatches(sentences, 'hello world')); \n/* output\n[\n  \"hello world\",\n  \"our_world_is_a_beautiful_world\",\n  \"hello-africa\",\n  \"world is round\",\n]\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagiavinash%2Fpartial-match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsagiavinash%2Fpartial-match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsagiavinash%2Fpartial-match/lists"}