{"id":28140802,"url":"https://github.com/experience-monks/typing-ahead","last_synced_at":"2025-06-11T07:09:32.035Z","repository":{"id":41951640,"uuid":"290798709","full_name":"Experience-Monks/typing-ahead","owner":"Experience-Monks","description":"A lightweight library to build data model for typeahead feature","archived":false,"fork":false,"pushed_at":"2022-04-22T16:37:00.000Z","size":493,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-09T19:21:42.195Z","etag":null,"topics":["autocomplete","lightweight","logarithmic-complexity","modular","typeahead"],"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/Experience-Monks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-27T14:32:43.000Z","updated_at":"2023-12-01T07:41:24.000Z","dependencies_parsed_at":"2022-08-12T00:22:54.647Z","dependency_job_id":null,"html_url":"https://github.com/Experience-Monks/typing-ahead","commit_stats":null,"previous_names":["experience-monks/typing-ahead","jam3/typing-ahead"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Experience-Monks%2Ftyping-ahead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Experience-Monks%2Ftyping-ahead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Experience-Monks%2Ftyping-ahead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Experience-Monks%2Ftyping-ahead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Experience-Monks","download_url":"https://codeload.github.com/Experience-Monks/typing-ahead/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Experience-Monks%2Ftyping-ahead/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259219697,"owners_count":22823576,"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":["autocomplete","lightweight","logarithmic-complexity","modular","typeahead"],"created_at":"2025-05-14T18:12:27.588Z","updated_at":"2025-06-11T07:09:31.999Z","avatar_url":"https://github.com/Experience-Monks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](/docs/typing-ahead-logo.jpg)\n\n\u003e A lightweight library to build data model for typeahead feature\n\n[![Known Vulnerabilities](https://snyk.io/test/github/Jam3/typing-ahead/badge.svg?targetFile=package.json)](https://snyk.io/test/github/Jam3/typing-ahead?targetFile=package.json) [![GitHub license](https://img.shields.io/github/license/Jam3/typing-ahead)](https://github.com/Jam3/typing-ahead/blob/master/LICENSE)\n\n[![NPM](https://nodei.co/npm/typing-ahead.png)](https://nodei.co/npm/typing-ahead/)\n\n# typing-ahead\n\nThis is a lightweight module for generating a data model to perform typeahead or autocomplete task in logarithmic time.\n\nIt has two public methods:\n\n- generate: Lets you generate a data model consists of words\n- find: Finds the closest match of the input word within the provided model\n\n## Get Started\n\n1. Import the module onto your project and build the data model by passing an array of words \n\n2. Pass the model and some characters to the `find` function to get results\n\n### Example\n\n```\nconst typingAhead = require('typing-ahead');\n\nconst myModel = typingAhead.generate(['typingahead', 'autocomplete']);\nconst results = typingAhead.find('typing', myModel); // result ['typingahead']\n```\n\nThis example is made with [Jam3 NextJS Generator](https://github.com/Jam3/nyg-nextjs)\n![Example](/docs/typing-ahead-example.gif)\n\n\n## Unit Test\nThere are some test cases provided in  `./__test__/index.test.js` to ensure that the data model is built correctly.\n\n`npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexperience-monks%2Ftyping-ahead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexperience-monks%2Ftyping-ahead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexperience-monks%2Ftyping-ahead/lists"}