UNPKG

@neumatter/big-integer

Version:

An extendable class representing JavaScript's bigint data type.

41 lines (25 loc) 856 B
# BigInteger ![plot](https://img.shields.io/npm/v/@neumatter/big-integer?style=for-the-badge&labelColor=black) ![plot](https://img.shields.io/npm/dt/@neumatter/big-integer?style=for-the-badge&labelColor=black) [![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard) <br /> ## Table of Contents - [ Installation ](#install) - [ Usage ](#usage) <br /> <a name="install"></a> ## Install ```console npm i @neumatter/big-integer ``` <br /> <a name="usage"></a> ## Usage ### static (class) `BigInteger.from`: Args [`value: Uint8Array | Buffer | ByteView | BigIntegerJSON | BigInteger | string | number | boolean`] Returns `BigInteger` ```js import BigInteger from '@neumatter/big-integer' const bigInteger = BigInteger.from('9249234234093460909559834421') // use bigInteger ```