0.0.4 • Published 1 year ago

mining-numbers v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Mining numbers

CI

Convert mining number from number/string to number/string

Install

npm install mining-numbers

Usage

import { Hashrate, Difficulty } from 'mining-numbers'

// Supported units 'H/s', 'KH/s', 'MH/s', 'GH/s', 'TH/s', 'PH/s', 'EH/s'
Hashrate.parse(1500).toString() // 1.5 KH/s
Hashrate.parse('1.5 KH/s').toNumber() // 1500
Hashrate.parse('1.5KH/s').toNumber() // 1500

// Supported units 'k', 'M', 'B', 'T', 'P', 'E'
Difficulty.parse(1500).toString() // 1.50K
Difficulty.parse('1.50k').toNumber() // 1500
Difficulty.parse('1.50 k').toNumber() // 1500

Contribue

# install dependencies
bun install

# test the app
bun test

# build the app, available under dist
bun run build

License

MIT

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago