{"id":21244427,"url":"https://github.com/unyt-org/example-history-api","last_synced_at":"2026-05-12T16:02:41.377Z","repository":{"id":231536624,"uuid":"781970442","full_name":"unyt-org/example-history-api","owner":"unyt-org","description":"A example project to showcase the DATEX history API","archived":false,"fork":false,"pushed_at":"2025-03-21T19:43:35.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T21:38:29.809Z","etag":null,"topics":["datex","pointers","typescript","uix","uix-example","unyt"],"latest_commit_sha":null,"homepage":"https://history.example.unyt.org","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/unyt-org.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},"funding":{"github":["unyt-org"],"patreon":"unyt","custom":["https://unyt.org/donate"]}},"created_at":"2024-04-04T11:46:29.000Z","updated_at":"2025-03-21T19:43:38.000Z","dependencies_parsed_at":"2025-03-15T04:35:20.176Z","dependency_job_id":null,"html_url":"https://github.com/unyt-org/example-history-api","commit_stats":null,"previous_names":["unyt-org/example-history-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unyt-org/example-history-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyt-org%2Fexample-history-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyt-org%2Fexample-history-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyt-org%2Fexample-history-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyt-org%2Fexample-history-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unyt-org","download_url":"https://codeload.github.com/unyt-org/example-history-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unyt-org%2Fexample-history-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32946410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T09:19:52.626Z","status":"ssl_error","status_checked_at":"2026-05-12T09:17:33.438Z","response_time":102,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["datex","pointers","typescript","uix","uix-example","unyt"],"created_at":"2024-11-21T01:25:20.075Z","updated_at":"2026-05-12T16:02:41.370Z","avatar_url":"https://github.com/unyt-org.png","language":"TypeScript","funding_links":["https://github.com/sponsors/unyt-org","https://patreon.com/unyt","https://unyt.org/donate"],"categories":[],"sub_categories":[],"readme":"# DATEX History API Example\n\nThis is a example project demonstrating how to use the\n[History API](https://docs.unyt.org/manual/datex/history) of DATEX. The API\nprovides a way to undo and redo state changes of one or multiple pointers.\n\n## Usage\n\nThe history for a pointer can be managed by creating a new History object and\nadding the pointer to the history:\n\n```ts\nimport { History } from \"datex-core-legacy/utils/history.ts\";\n\nconst entries = $$([]);\nconst history = new History();\nhistory.add(entries);\n```\n\nNow, every state change of the entries array is recorded and can be undone or\nrepeated:\n\n```ts\nentries.push(\"Entry 1\");\nentries.push(\"Entry 2\");\nentries.push(\"Entry 3\");\nconsole.log(entries); // [\"Entry 1\", \"Entry 2\", \"Entry 3\"]\n\n// undo last change\nhistory.back();\nconsole.log(entries); // [\"Entry 1\", \"Entry 2\"]\n\n// undo second last change\nhistory.back();\nconsole.log(entries); // [\"Entry 1\"]\n\n// repeat second last change\nhistory.forward();\nconsole.log(entries); // [\"Entry 1\", \"Entry 2\"]\n```\n\n---\n\n\u003csub\u003e\u0026copy; unyt 2025 • [unyt.org](https://unyt.org)\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funyt-org%2Fexample-history-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funyt-org%2Fexample-history-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funyt-org%2Fexample-history-api/lists"}