EricCrosson / fp-ts-bigint

BigInt library for fp-ts

Home Page:https://ericcrosson.github.io/fp-ts-bigint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Related

Acknowledgments

About

BigInt library for fp-ts

https://ericcrosson.github.io/fp-ts-bigint/

License:ISC License


Languages

Language:TypeScript 89.9%Language:Nix 10.0%Language:Shell 0.1%