{"id":19560046,"url":"https://github.com/plotdb/ctrlz","last_synced_at":"2026-03-03T01:38:40.482Z","repository":{"id":42956264,"uuid":"232288189","full_name":"plotdb/ctrlz","owner":"plotdb","description":"JSON edit history manager for undo / redo functionality, powered by operational transform. ","archived":false,"fork":false,"pushed_at":"2023-03-04T05:36:27.000Z","size":1039,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-08T22:40:17.165Z","etag":null,"topics":["operational-transformation"],"latest_commit_sha":null,"homepage":"http://plotdb.github.io/ctrlz","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plotdb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-07T09:19:41.000Z","updated_at":"2022-01-22T08:09:25.000Z","dependencies_parsed_at":"2023-01-29T03:45:36.841Z","dependency_job_id":null,"html_url":"https://github.com/plotdb/ctrlz","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fctrlz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fctrlz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fctrlz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plotdb%2Fctrlz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plotdb","download_url":"https://codeload.github.com/plotdb/ctrlz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240817078,"owners_count":19862418,"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":["operational-transformation"],"created_at":"2024-11-11T05:05:43.204Z","updated_at":"2025-11-20T01:03:38.864Z","avatar_url":"https://github.com/plotdb.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ctrlz\n\nJSON Edit History Manager for Undo / Redo Functionality, powered by operational transform. Keep state and support undo for anything that can be expressed / stored by JSON!\n\n\n# Install\n\ninclude required js file:\n\n```\n    \u003cscript src=\"path-to-your-ctrlz-bundle.js\"\u003e\u003c/script\u003e\n```\n\nctrlz uses `@plotdb/json0` as a dependency. `ctrlz.bundle.min.js` already includes it but for a separate file, use `ctrlz.mins.js` instead, and include `@plotdb/json0` separately downloaded from [its repo](https://github.com/plotdb/json0).\n\n\n## Usage\n\n\n```\n    /* init directly in constructor */\n    mananger = new ctrlz({obj: obj});\n\n    /* or alternatively, reset anytime after initialized */\n    manager.reset({obj: obj});\n\n    /* when obj is updated */\n    manager.update(obj);\n\n    /* if you have ot to apply: */ \n    manager.apply({op: op});\n\n    /* undo, return a undo-ed object */\n    ret = manager.undo();\n\n    /* redo, return a redo-ed object */\n    ret = manager.redo();\n\n    /* clean history */\n    mananger.clear();\n```\n\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Fctrlz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplotdb%2Fctrlz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplotdb%2Fctrlz/lists"}