{"id":20570102,"url":"https://github.com/brechtcs/routesfile","last_synced_at":"2025-10-26T19:07:59.376Z","repository":{"id":57355691,"uuid":"121420449","full_name":"brechtcs/routesfile","owner":"brechtcs","description":"Parse ROUTES file for static sites","archived":false,"fork":false,"pushed_at":"2018-02-14T17:36:50.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-05T19:46:21.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/brechtcs.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":"2018-02-13T18:35:14.000Z","updated_at":"2018-02-13T18:42:53.000Z","dependencies_parsed_at":"2022-09-26T16:31:43.384Z","dependency_job_id":null,"html_url":"https://github.com/brechtcs/routesfile","commit_stats":null,"previous_names":["brechtpm/routesfile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brechtcs/routesfile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brechtcs%2Froutesfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brechtcs%2Froutesfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brechtcs%2Froutesfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brechtcs%2Froutesfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brechtcs","download_url":"https://codeload.github.com/brechtcs/routesfile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brechtcs%2Froutesfile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281156074,"owners_count":26453011,"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-26T02:00:06.575Z","response_time":61,"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-16T05:11:29.224Z","updated_at":"2025-10-26T19:07:59.355Z","avatar_url":"https://github.com/brechtcs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# routesfile\n\nParse ROUTES file for static sites\n\n## Install\n\n`npm install routesfile`\n\n## Usage\n\n```js\nvar routesfile = require('routesfile')\n\n// async\nroutesfile.read('./ROUTES', function (err, routes) {\n  if (err) throw err\n  // do something with `routes`\n})\n\n// sync\nvar fs = require('fs')\n\nvar file = fs.readFileSync('./ROUTES', 'utf-8')\nvar routes = routesfile.parse(file)\n// do something with `routes`\n```\n\n## API\n\n### `var routes = routesfile.parse(string)`\n\nReturns a routes objects of the following format:\n\n```js\n{\n  [redirectFromUrl: string]: {\n    code: [statusCode: number],\n    target: [redirectToUrl: string]\n  },\n  // more routes...\n}\n```\n\n### `routesfile.read(path, cb)`\n\nCallback with signature `(err, routes)`, with `routes` being the same format as returned by the `parse` method.\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrechtcs%2Froutesfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrechtcs%2Froutesfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrechtcs%2Froutesfile/lists"}