{"id":13605273,"url":"https://github.com/choojs/choo-redirect","last_synced_at":"2025-04-12T05:32:14.072Z","repository":{"id":57198230,"uuid":"76357483","full_name":"choojs/choo-redirect","owner":"choojs","description":"🎬 - Redirect a view to another view","archived":false,"fork":false,"pushed_at":"2017-05-20T01:42:13.000Z","size":5,"stargazers_count":19,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-22T01:16:09.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/choojs.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}},"created_at":"2016-12-13T12:38:08.000Z","updated_at":"2020-06-19T06:10:16.000Z","dependencies_parsed_at":"2022-09-16T13:12:31.710Z","dependency_job_id":null,"html_url":"https://github.com/choojs/choo-redirect","commit_stats":null,"previous_names":["yoshuawuyts/choo-redirect"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fchoo-redirect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fchoo-redirect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fchoo-redirect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choojs%2Fchoo-redirect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choojs","download_url":"https://codeload.github.com/choojs/choo-redirect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161277,"owners_count":21057554,"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-08-01T19:00:56.881Z","updated_at":"2025-04-12T05:32:13.776Z","avatar_url":"https://github.com/choojs.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# choo-redirect [![stability][0]][1]\n[![npm version][2]][3] [![build status][4]][5] [![test coverage][6]][7]\n[![downloads][8]][9] [![js-standard-style][10]][11]\n\nRedirect a view to another view.\n\n## Usage\n```js\nvar redirect = require('choo-redirect')\nvar html = require('choo/html')\nvar choo = require('choo')\n\nvar app = choo()\n\napp.route('/', redirect('/welcome'))\napp.route('/welcome', welcomeView)\n\napp.mount('body')\n\nfunction welcomeView () {\n  return html`\n    \u003cbody\u003e\n      \u003cdiv\u003ewelcome!\u003c/div\u003e\n    \u003c/body\u003e\n  `\n}\n```\n\n## API\n### view = redirect(route, rootSelector?)\nCreate a new view that redirects to a `route`. Can take an optional second\nargument for the root selector which is used as the entry point of the\napplication. Defaults to `document.body`.\n\n## Installation\n```sh\n$ npm install choo-redirect\n```\n\n## License\n[MIT](https://tldrlegal.com/license/mit-license)\n\n[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[1]: https://nodejs.org/api/documentation.html#documentation_stability_index\n[2]: https://img.shields.io/npm/v/choo-redirect.svg?style=flat-square\n[3]: https://npmjs.org/package/choo-redirect\n[4]: https://img.shields.io/travis/yoshuawuyts/choo-redirect/master.svg?style=flat-square\n[5]: https://travis-ci.org/yoshuawuyts/choo-redirect\n[6]: https://img.shields.io/codecov/c/github/yoshuawuyts/choo-redirect/master.svg?style=flat-square\n[7]: https://codecov.io/github/yoshuawuyts/choo-redirect\n[8]: http://img.shields.io/npm/dm/choo-redirect.svg?style=flat-square\n[9]: https://npmjs.org/package/choo-redirect\n[10]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square\n[11]: https://github.com/feross/standard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fchoo-redirect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoojs%2Fchoo-redirect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoojs%2Fchoo-redirect/lists"}