npm.io
2.1.8 • Published 7 months ago

fp-ts-bigint

Licence
ISC
Version
2.1.8
Deps
0
Size
17 kB
Vulns
0
Weekly
0
Stars
5

fp-ts-bigint

Build Status

BigInt library for fp-ts

As not every JavaScript runtime supports BigInt, this library contains opt-in bigint functions absent from fp-ts:

  • Eq
  • Ord
  • Show
  • Field
  • semigroupSum
  • semigroupProduct
  • monoidSum
  • monoidProduct
  • magmaSub

Install

npm install fp-ts-bigint

Use

Same as fp-ts

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

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

Acknowledgments