{"id":16230262,"url":"https://github.com/jerelmiller/dictionary-trie","last_synced_at":"2025-04-08T05:47:02.690Z","repository":{"id":139727431,"uuid":"89545151","full_name":"jerelmiller/dictionary-trie","owner":"jerelmiller","description":"A dictionary built using trie data structure","archived":false,"fork":false,"pushed_at":"2017-04-29T02:21:21.000Z","size":56,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T03:52:21.174Z","etag":null,"topics":["algorithm","javascript","trie"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/dictionary-trie","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/jerelmiller.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":"2017-04-27T02:07:26.000Z","updated_at":"2021-06-08T09:28:17.000Z","dependencies_parsed_at":"2023-05-06T15:31:13.969Z","dependency_job_id":null,"html_url":"https://github.com/jerelmiller/dictionary-trie","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerelmiller%2Fdictionary-trie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerelmiller%2Fdictionary-trie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerelmiller%2Fdictionary-trie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerelmiller%2Fdictionary-trie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerelmiller","download_url":"https://codeload.github.com/jerelmiller/dictionary-trie/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247785920,"owners_count":20995642,"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","javascript","trie"],"created_at":"2024-10-10T13:00:43.514Z","updated_at":"2025-04-08T05:47:02.657Z","avatar_url":"https://github.com/jerelmiller.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/jerelmiller/dictionary-trie.svg?branch=master)](https://travis-ci.org/jerelmiller/dictionary-trie)\n\n# Dictionary Trie\n\nCreate and efficiently search a dictionary of words.\n\n## Installation\n\nnpm:\n```\nnpm install --save dictionary-trie\n```\n\nyarn:\n```\nyarn add dictionary-trie\n```\n\n## Usage\n\nCreate your dictionary by importing the `createDictionary` function.\n```javascript\nimport createDictionary from 'dictionary-trie'\n\nconst words = [\n  'rat', 'rate', 'music', 'musician', 'flower', 'flow', 'data', 'water',\n  'wait', 'rain', 'rainer', 'rained', 'raining', 'couch', 'room'\n]\n\nconst dictionary = createDictionary(words)\n```\n\nYou can use this dictionary to determine whether a word is included. Note this\nis not a partial match.\n```javascript\ndictionary.includes('music') // =\u003e true\ndictionary.includes('rat') // =\u003e true\ndictionary.includes('rats') // =\u003e false\n```\n\nIf you would like to partially match and return possiblity, use the `search`\nfunction.\n```javascript\ndictionary.search('ra') // =\u003e ['rat', 'rate', 'rain', 'rainer', 'rained', 'raining']\ndictionary.search('rai') // =\u003e ['rain', 'rainer', 'rained', 'raining']\ndictionary.search('rain') // =\u003e ['rain', 'rainer', 'rained', 'raining']\ndictionary.search('raine') // =\u003e ['rainer', 'rained']\ndictionary.search('rained') // =\u003e ['rained']\ndictionary.search('couches') // =\u003e []\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerelmiller%2Fdictionary-trie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerelmiller%2Fdictionary-trie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerelmiller%2Fdictionary-trie/lists"}