{"id":22258082,"url":"https://github.com/coot/purescript-js-history","last_synced_at":"2026-01-05T19:10:32.055Z","repository":{"id":58225409,"uuid":"84586483","full_name":"coot/purescript-js-history","owner":"coot","description":"interface for browser history, plus memory history","archived":false,"fork":false,"pushed_at":"2017-04-07T22:21:11.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T03:41:32.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PureScript","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/coot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-10T17:54:30.000Z","updated_at":"2017-03-10T17:55:21.000Z","dependencies_parsed_at":"2022-08-31T03:24:06.654Z","dependency_job_id":null,"html_url":"https://github.com/coot/purescript-js-history","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fpurescript-js-history","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fpurescript-js-history/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fpurescript-js-history/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coot%2Fpurescript-js-history/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coot","download_url":"https://codeload.github.com/coot/purescript-js-history/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245467616,"owners_count":20620216,"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":[],"created_at":"2024-12-03T08:13:25.131Z","updated_at":"2026-01-05T19:10:27.009Z","avatar_url":"https://github.com/coot.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PureScript js history\n\nThe module provides a unified interface for managing histories using:\n * browser history based on [`DOM.HTML.History`](https://pursuit.purescript.org/packages/purescript-dom/)\n * memory history implemented using [`Ref`](https://pursuit.purescript.org/packages/purescript-refs)\n\nThere common type for them is\n```purescript\ntype History e state =\n  { state :: Eff (history:: HISTORY, dom :: DOM | e) (Maybe state)\n  , back :: Eff (history:: HISTORY, dom :: DOM | e ) Unit\n  , forward :: Eff (history:: HISTORY, dom :: DOM | e) Unit\n  , go :: Delta -\u003e Eff (history:: HISTORY, dom :: DOM | e) Unit\n  , pushState :: state -\u003e DocumentTitle -\u003e URL -\u003e Eff (history :: HISTORY, dom :: DOM | e) Unit\n  , replaceState :: state -\u003e DocumentTitle -\u003e URL -\u003e Eff (history :: HISTORY, dom :: DOM | e) Unit \n  }\n```\n\nNote that if you want to use browser history `state` has to be an instance of\n`IsForeign` and `AsForeign` classes.\n\nThe memory history also adds `addEventListener` function with a similar type to\nthe one you'd use when attaching events to the DOM.  For the browser history\njust use the `DOM.Event.EventTarget` module to attach events on the window object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoot%2Fpurescript-js-history","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoot%2Fpurescript-js-history","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoot%2Fpurescript-js-history/lists"}