{"id":18890892,"url":"https://github.com/igrep/hyperapp-snapshot","last_synced_at":"2026-07-15T10:32:21.298Z","repository":{"id":139468391,"uuid":"447431052","full_name":"igrep/hyperapp-snapshot","owner":"igrep","description":"Take and reproduce a snapshot of a hyperapp as a JSON","archived":false,"fork":false,"pushed_at":"2022-01-13T07:23:03.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T21:14:09.484Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igrep.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,"zenodo":null}},"created_at":"2022-01-13T02:00:48.000Z","updated_at":"2022-01-13T03:25:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"292aae97-e0ad-451e-b972-a54234c9f7d7","html_url":"https://github.com/igrep/hyperapp-snapshot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/igrep/hyperapp-snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrep%2Fhyperapp-snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrep%2Fhyperapp-snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrep%2Fhyperapp-snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrep%2Fhyperapp-snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igrep","download_url":"https://codeload.github.com/igrep/hyperapp-snapshot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igrep%2Fhyperapp-snapshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35501664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-08T07:57:59.949Z","updated_at":"2026-07-15T10:32:21.293Z","avatar_url":"https://github.com/igrep.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hyperapp-snapshot\n\nTake and reproduce a snapshot of a hyperapp state as a JSON. Provides `wrapView` function to wrap your hyperapp application's `view` function to append two buttons to the view: save and load the state of the application as a JSON file.\n\n## Example\n\n[Run on Stackblitz](https://stackblitz.com/edit/typescript-rmfwbs?file=index.ts)\n\n```ts\nimport { h, text, app } from 'hyperapp';\nimport * as Snapshot from 'hyperapp-snapshot';\n\nconst view = (model) =\u003e\n  h('main', {}, [\n    // Your app view\n  ]);\n\napp({\n  init: initialModel,\n  view: Snapshot.wrapView(view),\n  /* Or else:\n  view: Snapshot.wrapView(view, JSON.parse)\n  // You can optionally pass a JSON decoder function to convert the loaded\n  // JSON string into the application's state type.\n  */\n  node: document.getElementById('app'),\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrep%2Fhyperapp-snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figrep%2Fhyperapp-snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figrep%2Fhyperapp-snapshot/lists"}