{"id":27127852,"url":"https://github.com/jacob-shuman/wordle-logic","last_synced_at":"2026-04-20T13:03:21.285Z","repository":{"id":213898078,"uuid":"735191463","full_name":"jacob-shuman/wordle-logic","owner":"jacob-shuman","description":"A typesafe deno/node package to facilitate a game of wordle using nanostores","archived":false,"fork":false,"pushed_at":"2024-02-04T22:49:29.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-02-04T23:42:05.230Z","etag":null,"topics":["deno","dnt","nanostores","node","typescript","wordle"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jacob-shuman.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}},"created_at":"2023-12-24T01:55:54.000Z","updated_at":"2023-12-24T03:16:08.000Z","dependencies_parsed_at":"2024-02-04T23:48:14.079Z","dependency_job_id":null,"html_url":"https://github.com/jacob-shuman/wordle-logic","commit_stats":null,"previous_names":["jacob-shuman/wordle-logic"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-shuman%2Fwordle-logic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-shuman%2Fwordle-logic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-shuman%2Fwordle-logic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-shuman%2Fwordle-logic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacob-shuman","download_url":"https://codeload.github.com/jacob-shuman/wordle-logic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704498,"owners_count":20982293,"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":["deno","dnt","nanostores","node","typescript","wordle"],"created_at":"2025-04-07T17:58:05.294Z","updated_at":"2026-04-20T13:03:16.263Z","avatar_url":"https://github.com/jacob-shuman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wordle_logic\n\n\u003c!-- Badges --\u003e\n\n[![deno badge](https://img.shields.io/badge/deno-wordle__logic-black?style=for-the-badge\u0026labelColor=black)](https://deno.land/x/wordle_logic)\n[![npm badge](https://img.shields.io/badge/npm-wordle--logic-red?style=for-the-badge\u0026labelColor=red)](https://www.npmjs.com/package/wordle-logic)\n[![license badge](https://img.shields.io/badge/license-mit-blue?style=for-the-badge\u0026labelColor=blue)](https://github.com/jacob-shuman/wordle-logic/blob/main/LICENSE)\n\n\u003e A typesafe deno/npm package to facilitate a game of wordle using nanostores\n\n## Why?\n\nI plan on building a minimal adless version of\n[wordle](https://en.wikipedia.org/wiki/Wordle) and wanted to open source the\nlogic.\n\n## Getting started\n\nThis module exports a single `wordle()` function which exports\n[nanostores](https://github.com/nanostores/nanostores) and an `attempt()`\nfunction to test words.\n\n- `word`: a nanostore which holds the current game's word\n- `attempts`: a nanostore which holds the current game's guesses\n- `attempt()`: a function which takes in a single string and returns an object\n  with a `error?: WordleError` property.\n\n## Errors\n\nThe `attempt()` function will return an object with an `error?: WordleError`\nproperty if the attempt failed for any reason. Common errors are (for an\nexhaustive list see [mod.ts](./mod.ts)):\n\n- `\"max_attempts_reached\"`: the game is already over since the number of\n  attempts has reached `options?.maxAttempts` (6 by default)\n- `\"too_few_characters\"`: the attempted word has less characters then the\n  current word\n- `\"too_many_characters\"`: the attempted word has more characters then the\n  current word\n- `\"invalid_attempt\"`: the attempt did not pass the `options?.validateAttempt()`\n  function\n\n## Tasks\n\n| Task   | Description                                                      |\n| ------ | ---------------------------------------------------------------- |\n| `test` | run all tests once                                               |\n| `dev`  | run all tests in watch mode                                      |\n| `npm`  | compile npm package using [dnt](https://github.com/denoland/dnt) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-shuman%2Fwordle-logic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacob-shuman%2Fwordle-logic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-shuman%2Fwordle-logic/lists"}