# fp-ts-bigint

> BigInt library for fp-ts

Latest version **2.1.8** (published 2025-11-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install fp-ts-bigint
pnpm add fp-ts-bigint
yarn add fp-ts-bigint
bun add fp-ts-bigint
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.1.8 |
| Published | 2025-11-20 |
| First published | 2021-01-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Eric Crosson |
| Maintainers | hamroctopus |
| Keywords | fp-ts, bigint |

## Links

- npm: https://www.npmjs.com/package/fp-ts-bigint
- Repository: https://github.com/ericcrosson/fp-ts-bigint
- Issues: https://github.com/ericcrosson/fp-ts-bigint/issues
- npm.io page: https://npm.io/package/fp-ts-bigint

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 2.1.8 (latest) — 2025-11-20
- 2.0.2-beta.3 (beta) — 2022-10-20
- 2.1.7 — 2025-11-20
- 2.1.6 — 2023-12-13
- 2.1.5 — 2023-12-12
- 2.1.4 — 2023-05-28
- 2.1.3 — 2023-05-06
- 2.1.2 — 2023-01-10
- 2.1.1 — 2022-10-23
- 2.1.0 — 2022-10-23
- 2.0.4 — 2022-10-23
- 2.0.3 — 2022-10-23
- 2.0.2 — 2021-02-01
- 2.0.1 — 2021-01-31
- 2.0.0 — 2021-01-31
- … 3 more at https://npm.io/package/fp-ts-bigint/versions

## README

# fp-ts-bigint

[![Build Status][]](https://github.com/EricCrosson/fp-ts-bigint/actions/workflows/release.yml)

[build status]: https://github.com/EricCrosson/fp-ts-bigint/actions/workflows/release.yml/badge.svg?branch=master&event=push

> BigInt library for fp-ts

As not every JavaScript runtime supports `BigInt`, this library contains opt-in
`bigint` functions absent from [fp-ts](https://github.com/gcanti/fp-ts):

- [x] `Eq`
- [x] `Ord`
- [x] `Show`
- [ ] `Field`
- [x] `semigroupSum`
- [x] `semigroupProduct`
- [x] `monoidSum`
- [x] `monoidProduct`
- [x] `magmaSub`

## Install

```shell
npm install fp-ts-bigint
```

## Use

Same as fp-ts

```typescript
import * as B from "fp-ts-bigint";

B.semigroupSum.concat(2n, 3n); // => 5n
B.semigroupProduct.concat(2n, 5n); // => 10n
```

## Related

- [original fp-ts PR](https://github.com/gcanti/fp-ts/pull/1386)

## Acknowledgments

- [fp-ts](https://github.com/gcanti/fp-ts)

---
_Source: https://npm.io/package/fp-ts-bigint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
