New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@durhailay/bigint-utils

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@durhailay/bigint-utils - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "@durhailay/bigint-utils",
"version": "0.0.1",
"version": "0.0.2",
"description": "Utilities to handle bigints in web3 applications.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

# bigint-utils
A super lightweight library to handle bigints in web3 applications.
## Installation
```bash
npm install @durhailay/bigint-utils
```
## Usage
```typescript
import { BigNumber } from '@durhailay/bigint-utils'
const bn = new BigNumber(1234567891011123456789n, 18)
```
### Multiplication
```typescript
const result = bn.mul(2n)
```
### Division
```typescript
const result = bn.div(123456789n)
```
### Get the value
```typescript
const value = bn.value
```
### Get the decimals
```typescript
const decimals = bn.decimals
```
### toNumber
```typescript
const number = bn.toNumber()
// 123456789.1011123456789
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc