{"id":13452515,"url":"https://github.com/gcanti/fp-ts","last_synced_at":"2025-09-09T20:56:03.601Z","repository":{"id":37413055,"uuid":"80039696","full_name":"gcanti/fp-ts","owner":"gcanti","description":"Functional programming in TypeScript","archived":false,"fork":false,"pushed_at":"2025-08-18T04:59:41.000Z","size":23162,"stargazers_count":11278,"open_issues_count":191,"forks_count":511,"subscribers_count":98,"default_branch":"master","last_synced_at":"2025-08-18T06:35:15.979Z","etag":null,"topics":["algebraic-data-types","functional-programming","typescript"],"latest_commit_sha":null,"homepage":"https://gcanti.github.io/fp-ts/","language":"TypeScript","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/gcanti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"zenodo":null},"funding":{"github":["gcanti"]}},"created_at":"2017-01-25T17:44:09.000Z","updated_at":"2025-08-18T04:59:46.000Z","dependencies_parsed_at":"2022-07-10T22:46:22.553Z","dependency_job_id":"d274fbb9-070f-4d12-8c59-b37bb560fcb3","html_url":"https://github.com/gcanti/fp-ts","commit_stats":{"total_commits":2728,"total_committers":140,"mean_commits":"19.485714285714284","dds":"0.19758064516129037","last_synced_commit":"7e93e7c786e318e13bf7b203755c935675922600"},"previous_names":[],"tags_count":186,"template":false,"template_full_name":null,"purl":"pkg:github/gcanti/fp-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcanti%2Ffp-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcanti%2Ffp-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcanti%2Ffp-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcanti%2Ffp-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gcanti","download_url":"https://codeload.github.com/gcanti/fp-ts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gcanti%2Ffp-ts/sbom","scorecard":{"id":420529,"data":{"date":"2025-08-11","repo":{"name":"github.com/gcanti/fp-ts","commit":"e91bde112e0a2a4e617e8fc7f7a62ea4c10ba404"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":4,"reason":"Found 12/27 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gcanti/fp-ts/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/gcanti/fp-ts/main.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: TypeScriptPropertyBasedTesting integration found: test/Array.ts:1","Info: TypeScriptPropertyBasedTesting integration found: test/ReadonlyArray.ts:2","Info: TypeScriptPropertyBasedTesting integration found: test/Separated.ts:1","Info: TypeScriptPropertyBasedTesting integration found: test/Array.ts:1","Info: TypeScriptPropertyBasedTesting integration found: test/ReadonlyArray.ts:2","Info: TypeScriptPropertyBasedTesting integration found: test/Separated.ts:1"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-jv35-xqg7-f92r","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-9crc-q9x8-hgqq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T01:05:40.528Z","repository_id":37413055,"created_at":"2025-08-19T01:05:40.529Z","updated_at":"2025-08-19T01:05:40.529Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274361460,"owners_count":25271235,"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-09-09T02:00:10.223Z","response_time":80,"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":["algebraic-data-types","functional-programming","typescript"],"created_at":"2024-07-31T07:01:26.325Z","updated_at":"2025-09-09T20:56:03.549Z","avatar_url":"https://github.com/gcanti.png","language":"TypeScript","funding_links":["https://github.com/sponsors/gcanti"],"categories":["TypeScript","Libraries","Used by","**1. Libraries**","typescript","JavaScript框架","TypeScript Libraries","🤖 AI \u0026 Machine Learning"],"sub_categories":["UI Widget","Open source projects (\u003e1k⭐)","Functional Programming","大语言对话模型及数据"],"readme":"\u003ch3 align=\"center\"\u003e\n  \u003ca href=\"https://gcanti.github.io/fp-ts/\"\u003e\n    \u003cimg src=\"./docs/fp-ts-logo.png\"\u003e\n  \u003c/a\u003e\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\nFunctional programming in TypeScript\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/gcanti/fp-ts/actions\"\u003e\n    \u003cimg src=\"https://github.com/gcanti/fp-ts/actions/workflows/main.yml/badge.svg?branch=master\" alt=\"build status\" height=\"20\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/fp-ts\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/fp-ts.svg\" alt=\"npm downloads\" height=\"20\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n**📢 Important Announcement: fp-ts is Joining the Effect-TS Ecosystem!**\n\nWe are excited to announce that the `fp-ts` project is officially merging with the Effect-TS ecosystem. This is a significant step forward in the functional programming landscape, bringing together two powerful libraries under one roof. Giulio Canti, the author of `fp-ts`, is being welcomed into the Effect organization, promising an exciting future with enhanced capabilities and support.\n\n**What This Means for New Users:**\n\nEffect-TS can be regarded as the successor to `fp-ts v2` and embodies what would be considered `fp-ts v3`. This merger marks a significant evolution in the library's capabilities, integrating more features and functionalities tailored towards robust, type-safe, and scalable functional programming.\n\nFor more details on this merger and what it entails, please refer to the official [announcement here](https://dev.to/effect/a-bright-future-for-effect-455m). Additionally, you can explore more about Effect-TS and its offerings on our [website and documentation](https://effect.website/).\n\n# Introduction\n\n`fp-ts` is a library for _typed functional programming_ in TypeScript.\n\n`fp-ts` aims to allow developers to use _popular patterns and abstractions_ that are available in most functional languages. For this, it includes the most popular data types, type classes and abstractions such as [Option](https://gcanti.github.io/fp-ts/modules/Option.ts), [Either](https://gcanti.github.io/fp-ts/modules/Either.ts), [IO](https://gcanti.github.io/fp-ts/modules/IO.ts), [Task](https://gcanti.github.io/fp-ts/modules/Task.ts), [Functor](https://gcanti.github.io/fp-ts/modules/Functor.ts), [Applicative](https://gcanti.github.io/fp-ts/modules/Applicative.ts), [Monad](https://gcanti.github.io/fp-ts/modules/Monad.ts) to empower users to write pure FP apps and libraries built atop higher order abstractions.\n\nA distinctive feature of `fp-ts` with respect to other functional libraries is its implementation of [Higher Kinded Types](\u003chttps://en.wikipedia.org/wiki/Kind_(type_theory)\u003e), which TypeScript doesn't support natively.\n\n**Inspired by**\n\n- [Haskell](https://www.haskell.org)\n- [PureScript](https://www.purescript.org)\n- [Scala](https://www.scala-lang.org)\n\n# Sponsors\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\n      \u003ca href=\"https://unsplash.com/\"\u003e\n        \u003cimg src=\"https://avatars.githubusercontent.com/u/9951955?s=200\u0026v=4\" width=\"200px;\" alt=\"Unsplash\" /\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      \u003cb\u003eUnsplash\u003c/b\u003e\n      \u003cbr /\u003e\n      \u003ca href=\"https://unsplash.com/\"\u003ehttps://unsplash.com/\u003c/a\u003e\n      \u003cbr /\u003e\n      \u003cp width=\"200px\"\u003e\n        The internet’s source for visuals.\u003cbr/\u003e\n        Powered by creators everywhere.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n# Installation\n\nTo install the stable version:\n\n```\nnpm install fp-ts\n```\n\nMake sure to always have a single version of `fp-ts` installed in your project. Multiple versions are known to cause `tsc` to hang during compilation. You can check the versions currently installed using `npm ls fp-ts` (make sure there's a single version and all the others are marked as `deduped`).\n\n## TypeScript compatibility\n\n**Strictness** – This library is conceived, tested and is supposed to be consumed by TypeScript with the `strict` flag turned on.\n\n| `fp-ts` version | required `typescript` version |\n| --------------- | ----------------------------- |\n| 2.0.x+          | 3.5+                          |\n| 1.15.x+         | 3.1+                          |\n| \u003c= 1.14.4       | 2.8+ (\\*)                     |\n\n(\\*) If you are running `\u003c typescript@3.0.1` you have to polyfill the `unknown` type. You can use [unknown-ts](https://github.com/gcanti/unknown-ts) as a polyfill.\n\n# Documentation\n\n**Disclaimer**. Teaching functional programming is out of scope of this project, so the documentation assumes you already know what FP is.\n\n- [Docs](https://gcanti.github.io/fp-ts)\n- [Learning Resources](https://gcanti.github.io/fp-ts/learning-resources/)\n- [Ecosystem](https://gcanti.github.io/fp-ts/ecosystem/)\n- API Reference\n  - [version 2.x (current)](https://gcanti.github.io/fp-ts/modules/)\n  - [version 1.x](https://github.com/gcanti/fp-ts/tree/1.x/docs/modules/)\n\n# Help\n\nIf you need help with `fp-ts` check out:\n\n- this [Discord server](https://discord.gg/HVWmBBXM8A)\n- the `#fp-ts` channel on [FP slack](https://fpslack.com/).\n\n# Development\n\n- [Code conventions](https://gcanti.github.io/fp-ts/guides/code-conventions)\n\n# License\n\nThe MIT License (MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcanti%2Ffp-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcanti%2Ffp-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcanti%2Ffp-ts/lists"}