{"id":14069964,"url":"https://github.com/mobily/ts-belt","last_synced_at":"2025-05-14T18:05:24.801Z","repository":{"id":37056991,"uuid":"317193517","full_name":"mobily/ts-belt","owner":"mobily","description":"🔧 Fast, modern, and practical utility library for FP in TypeScript.","archived":false,"fork":false,"pushed_at":"2024-05-27T03:59:46.000Z","size":16981,"stargazers_count":1158,"open_issues_count":50,"forks_count":29,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-11T05:16:12.269Z","etag":null,"topics":["array","flow","fp","functional-programming","monad","option","option-type","result","result-type","typescript"],"latest_commit_sha":null,"homepage":"https://mobily.github.io/ts-belt","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/mobily.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"custom":["https://www.buymeacoffee.com/utSC0k7"]}},"created_at":"2020-11-30T10:52:03.000Z","updated_at":"2025-05-07T13:15:01.000Z","dependencies_parsed_at":"2024-01-02T23:42:35.670Z","dependency_job_id":"f56713f0-7274-4b75-b58b-928e5781859d","html_url":"https://github.com/mobily/ts-belt","commit_stats":{"total_commits":429,"total_committers":9,"mean_commits":"47.666666666666664","dds":0.06526806526806528,"last_synced_commit":"c825d9709de1e5d15b1b362429e0cee56c96c516"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobily%2Fts-belt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobily%2Fts-belt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobily%2Fts-belt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobily%2Fts-belt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobily","download_url":"https://codeload.github.com/mobily/ts-belt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253708793,"owners_count":21951057,"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":["array","flow","fp","functional-programming","monad","option","option-type","result","result-type","typescript"],"created_at":"2024-08-13T07:07:22.664Z","updated_at":"2025-05-14T18:05:19.792Z","avatar_url":"https://github.com/mobily.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/utSC0k7"],"categories":["Node","TypeScript","typescript"],"sub_categories":["Functional Programming"],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/mobily/ts-belt/master/assets/ts-belt-frame.png\" width=\"480\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://app.circleci.com/pipelines/github/mobily/ts-belt\"\u003e\n    \u003cimg src=\"https://img.shields.io/circleci/build/github/mobily/ts-belt.svg?style=flat-square\u0026amp;logo=circleci\" alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/mobily/ts-belt?branch=master\"\u003e\n    \u003cimg src=\"https://img.shields.io/coveralls/github/mobily/ts-belt.svg?style=flat-square\u0026amp;logo=coveralls\" alt=\"Coverage\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@mobily/ts-belt\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@mobily/ts-belt.svg?style=flat-square\u0026amp;logo=npm\" alt=\"npm\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://makeapullrequest.com\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\" alt=\"PRs Welcome\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"#contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/all_contributors-11-orange.svg?style=flat-square\" alt=\"All Contributors\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/mobily/ts-belt/blob/master/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square\" alt=\"GitHub license\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eFast, modern, and practical utility library for FP in TypeScript.\u003c/strong\u003e\n\u003c/p\u003e\n\n## Documentation\n\nFull documentation can be found [here](https://mobily.github.io/ts-belt/).\n\n## Features\n\n- 🚀 built with `ReScript`, which generates highly performant JavaScript code (see the benchmark results [here](https://mobily.github.io/ts-belt/benchmarks/introduction))\n- 👀 provides more readable code, due to the `data-first` approach\n- ✨ supports `TypeScript` and `Flow`\n- 🛡 helps you write safer code with `Option` and `Result` types\n- 🎯 all functions return immutable data (no side-effects)\n- 🌲 tree-shakeable\n- 📝 fully documented\n\n## Getting started\n\n### Installation\n\n```shell\nyarn add @mobily/ts-belt\n```\n\nor with `npm`\n\n```shell\nnpm install @mobily/ts-belt --save\n```\n\n### Usage\n\n| Module | Namespace | Description |\n|--|-----------|--|\n| [Array](https://mobily.github.io/ts-belt/api/array) | A | Utility functions for `Array`. |\n| [Boolean](https://mobily.github.io/ts-belt/api/boolean) | B | Utility functions for `Boolean`. |\n| [Number](https://mobily.github.io/ts-belt/api/number) | N | Utility functions for `Number`. |\n| [Object (Dict)](https://mobily.github.io/ts-belt/api/object) | D | Utility functions for `Object`. |\n| [String](https://mobily.github.io/ts-belt/api/string) | S | Utility functions for `String`. |\n| [Guards](https://mobily.github.io/ts-belt/api/guards) | G | Various TypeScript guards. |\n| [Option](https://mobily.github.io/ts-belt/api/option) | O | Functions for handling the `Option` data type that represents the existence and nonexistence of a value. |\n| [Result](https://mobily.github.io/ts-belt/api/result) | R | Functions for describing the result of a certain operation without relying on exceptions. |\n| [Function](https://mobily.github.io/ts-belt/api/function) | F | Other useful functions. |\n\n```typescript\nimport { A, O, N, pipe } from '@mobily/ts-belt'\n\npipe(\n  [1, 2, 3, 4, 5], // → [1, 2, 3, 4, 5]\n  A.dropExactly(2), // → Some([3, 4, 5])\n  O.flatMap(A.head), // → Some(3)\n  O.map(N.multiply(10)), // → Some(30)\n  O.getWithDefault(0), // → 30\n) // → 30\n```\n\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://twitter.com/__marcin_\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1467712?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMarcin Dziewulski\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=mobily\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=mobily\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=mobily\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#design-mobily\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#maintenance-mobily\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://github.com/foull\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/902819?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKrzysztof Lenda\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=foull\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/panr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1303365?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRadek Kozieł\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=panr\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Fortidude\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/8781462?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eArtur\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=Fortidude\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/domeknn\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/9402280?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDominik Łopaciński\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=domeknn\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=domeknn\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=domeknn\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Eghizio\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/32049761?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJakub Wąsik\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=Eghizio\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Dilven\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/26671751?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKrystian Mateusiak\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=Dilven\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=Dilven\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=Dilven\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://typeofweb.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1338731?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMichał Miszczyszyn\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-mmiszy\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/remnantkevin\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/8270635?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKevin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=remnantkevin\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/anthony-khong\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/12151757?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAnthony Khong\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=anthony-khong\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=anthony-khong\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/mobily/ts-belt/commits?author=anthony-khong\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://pyrolistical.github.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/463642?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePyrolistical\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/mobily/ts-belt/commits?author=Pyrolistical\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-Pyrolistical\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#ideas-Pyrolistical\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://zoontek.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1902323?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMathieu Acthernoene\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-zoontek\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n## License\n\nThe MIT License.\n\nSee [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobily%2Fts-belt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobily%2Fts-belt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobily%2Fts-belt/lists"}