{"id":49538588,"url":"https://github.com/flycran/currying","last_synced_at":"2026-05-02T13:05:53.761Z","repository":{"id":243518027,"uuid":"812651563","full_name":"flycran/currying","owner":"flycran","description":"Currying是一个极具创意的Node Server框架，它使用函数式编程和严格的类型安全编写服务端应用，正如它的名字一样，Currying大量使用了高阶函数和柯里化来进行类型安全的传递上下文，保证不会丢失任何静态类型。但这仅仅是Currying的核心理念，它还提供了许多前所未有的新概念和思想来编写服务端应用，它将彻底改变现有的开发Node Server的思想。","archived":false,"fork":false,"pushed_at":"2024-06-16T14:27:37.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-16T16:00:02.919Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flycran.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-09T13:56:54.000Z","updated_at":"2024-06-16T14:27:40.000Z","dependencies_parsed_at":"2024-06-09T15:21:57.510Z","dependency_job_id":"80bcc678-5daa-4eef-836c-d4b71ed17215","html_url":"https://github.com/flycran/currying","commit_stats":null,"previous_names":["flycran/currying"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flycran/currying","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flycran%2Fcurrying","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flycran%2Fcurrying/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flycran%2Fcurrying/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flycran%2Fcurrying/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flycran","download_url":"https://codeload.github.com/flycran/currying/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flycran%2Fcurrying/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32534978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-05-02T13:05:52.986Z","updated_at":"2026-05-02T13:05:53.756Z","avatar_url":"https://github.com/flycran.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Currying\n\n\u003e Currying是一个极具创意的Node Server框架，它使用函数式编程和严格的类型安全编写服务端应用，正如它的名字一样，Currying大量使用了高阶函数和柯里化来进行类型安全的传递上下文，保证不会丢失任何静态类型。但这仅仅是Currying的核心理念，它还提供了许多前所未有的新概念和思想来编写服务端应用，它将彻底改变现有的开发Node Server的思想。\n\n\u003e 目前Currying仍处于开发阶段，但它的核心架构已经初见端倪，你可以使用类似如下的方式编写Currying App\n\n```ts\nconst root = createRouter()\n\n// 不带path的中间件\nconst r1 = root(() =\u003e {\n  // 为下级路由提供额外信息\n  return {\n    date: Date.now(),\n  }\n})\n\nr1.controller('/path-1', (ctx) =\u003e {\n  // 在这里拿到父级路由提供的额外信息\n  console.log('path-1 路由控制器被执行', ctx)\n})\n\n// 带path的中间件\nconst r2 = r1('/path-2')\n\nr2.controller('/', (ctx) =\u003e {\n  console.log('path-2 路由控制器被执行', ctx)\n})\n\n// 模拟请求\nfunction rootExecute(context: Omit\u003cContext, 'consumePath'\u003e) {\n  return root.execute({\n    ...context,\n    consumePath: context.path,\n  })\n}\n\nrootExecute({\n  path: '/a2',\n})\n```\n\n敬请期待！","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflycran%2Fcurrying","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflycran%2Fcurrying","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflycran%2Fcurrying/lists"}