{"id":15482486,"url":"https://github.com/guidsdo/matchfuzzy","last_synced_at":"2025-03-28T15:15:45.214Z","repository":{"id":44176411,"uuid":"134587845","full_name":"guidsdo/matchFuzzy","owner":"guidsdo","description":"Match your query fuzzy on given target","archived":false,"fork":false,"pushed_at":"2023-10-19T09:05:18.000Z","size":120,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-24T17:21:35.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guidsdo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-23T15:14:00.000Z","updated_at":"2023-06-23T15:05:49.000Z","dependencies_parsed_at":"2024-10-02T05:09:18.867Z","dependency_job_id":"21e80886-adcf-46bf-ab01-0d957801c8e3","html_url":"https://github.com/guidsdo/matchFuzzy","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/guidsdo%2FmatchFuzzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidsdo%2FmatchFuzzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidsdo%2FmatchFuzzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidsdo%2FmatchFuzzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guidsdo","download_url":"https://codeload.github.com/guidsdo/matchFuzzy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246049631,"owners_count":20715511,"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-10-02T05:09:16.520Z","updated_at":"2025-03-28T15:15:45.189Z","avatar_url":"https://github.com/guidsdo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# matchFuzzy()\nMatch your query fuzzy on given target\n\n[![Build Status](https://travis-ci.org/guidojo/matchFuzzy.svg?branch=master)](https://travis-ci.org/guidojo/matchFuzzy)\n[![npm version](https://badge.fury.io/js/matchfuzzy.svg)](https://badge.fury.io/js/matchfuzzy)\n[![Coverage Status](https://coveralls.io/repos/github/guidojo/matchFuzzy/badge.svg?branch=master)](https://coveralls.io/github/guidojo/matchFuzzy?branch=master)\n[![Known Vulnerabilities](https://snyk.io/test/github/guidojo/matchFuzzy:package.json/badge.svg?targetFile=package.json)](https://snyk.io/test/github/guidojo/matchFuzzy:package.json?targetFile=package.json)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n## Example (UI excluded)\nInput = `he`\n\nResult = highlighted characters\n\n\u003cimg src=\"https://github.com/guidojo/matchFuzzy/blob/master/images/example.png?raw=true\" /\u003e\n\n## Usage\nBelow is the type definition of the exported functions. For any issues or questions, just create an issue and I'll respond asap.\n\n```typescript\nexport declare type MatchResult = {\n    offset: number;\n    positions: number[];\n    extraChars: number;\n    trailingChars: number;\n};\n\n/**\n * Try to find a given query in a given target in a \"fuzzy\" manner.\n *\n * @param query the string you search with\n * @param target the string you search in\n * @param characterLimit maximum amount of characters in result. Example: { \" \": 6, \".\": 0 } means a sentence with a maximum of 6 spaces.\n */\nexport declare function matchFuzzy(query: string, target: string, characterLimit?: {\n    [character: string]: number;\n}): MatchResult | null;\n\n/**\n * Array sort function in order: extra chars, offset, trailing chars.\n *\n * @param a result a\n * @param b result b\n */\nexport declare function sort(a: MatchResult, b: MatchResult): 1 | -1 | 0;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidsdo%2Fmatchfuzzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguidsdo%2Fmatchfuzzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidsdo%2Fmatchfuzzy/lists"}