百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

ts-belt

> 编程语言
开源

TypeScript 中用于 FP 的快速、现代且实用的实用程序库。

1.2K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

TypeScript 中用于 FP 的快速、现代且实用的实用程序库。

Fast, modern, and practical utility library for FP in TypeScript.

Documentation

Full documentation can be found here.

Features

  • built with ReScript, which generates highly performant JavaScript code (see the benchmark results here)
  • provides more readable code, due to the data-first approach
  • ✨ supports TypeScript and Flow
  • helps you write safer code with Option and Result types
  • all functions return immutable data (no side-effects)
  • tree-shakeable
  • fully documented

Getting started

Installation

yarn add @mobily/ts-belt

or with npm

npm install @mobily/ts-belt --save

Usage

Module Namespace Description
Array A Utility functions for Array.
Boolean B Utility functions for Boolean.
Number N Utility functions for Number.
Object (Dict) D Utility functions for Object.
String S Utility functions for String.
Guards G Various TypeScript guards.
Option O Functions for handling the Option data type that represents the existence and nonexistence of a value.
Result R Functions for describing the result of a certain operation without relying on exceptions.
Function F Other useful functions.
import { A, O, N, pipe } from '@mobily/ts-belt'

pipe(
  [1, 2, 3, 4, 5], // → [1, 2, 3, 4, 5]
  A.dropExactly(2), // → Some([3, 4, 5])
  O.flatMap(A.head), // → Some(3)
  O.map(N.multiply(10)), // → Some(30)
  O.getWithDefault(0), // → 30
) // → 30

Contributors

Marcin Dziewulski ⚠️

Krzysztof Lenda

Radek Kozieł

Artur

Dominik Łopaciński ⚠️

Jakub Wąsik

Krystian Mateusiak ⚠️

Michał Miszczyszyn

Kevin

Anthony Khong ⚠️

Pyrolistical

Mathieu Acthernoene

License

The MIT License.

See LICENSE

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptarrayflowfpfunctional-programming

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言