{"id":17049378,"url":"https://github.com/samccone/strands","last_synced_at":"2025-10-12T16:52:19.616Z","repository":{"id":26252754,"uuid":"29699890","full_name":"samccone/strands","owner":"samccone","description":null,"archived":false,"fork":false,"pushed_at":"2015-01-22T20:59:29.000Z","size":120,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T04:27:25.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/samccone.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2015-01-22T20:58:34.000Z","updated_at":"2015-01-23T01:57:22.000Z","dependencies_parsed_at":"2022-08-26T17:22:38.955Z","dependency_job_id":null,"html_url":"https://github.com/samccone/strands","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samccone/strands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fstrands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fstrands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fstrands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fstrands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samccone","download_url":"https://codeload.github.com/samccone/strands/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samccone%2Fstrands/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012029,"owners_count":26085041,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"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-10-14T09:54:30.408Z","updated_at":"2025-10-12T16:52:19.574Z","avatar_url":"https://github.com/samccone.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### Strands\n\nA Router based around state and Promise based resolvers.\n\nEach route is defined under a \"state key\" that is decoupled from the route.\nEvery state can define `before` and `after` tasks.\n\n`before` tasks are evaluated before the previous state is left, the route will not change until all have been resolved. (if any throw or are rejected the state will not change)\n`after` tasks are evaluated after the state has changed.\n\n```js\nmyRouter = new Strands({\n  \"edit-cat\": {\n    route: \"cat/edit/:id\",\n    before: [fetchCat],\n    after:  [saveSave]\n  }\n})\n\nmyRouter.go(\"edit-cat\");\n\nfunction fetchCat(params) {\n  return fetch(\"cat\");\n}\n\nfunction saveCat() {\n  return fetch(\"cat\", {\n    method: \"post\",\n    body: serializeCat()\n  })\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamccone%2Fstrands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamccone%2Fstrands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamccone%2Fstrands/lists"}