fp-ts-bigint

BigInt library for fp-ts

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
fp-ts-bigint
392.1.22 months ago2 years agoMinified + gzip package size for fp-ts-bigint in KB

Readme

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:
  • x Eq
  • x Ord
  • x Show
  • Field
  • x semigroupSum
  • x semigroupProduct
  • x monoidSum
  • x monoidProduct
  • x 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

Related

Acknowledgments