0.0.6 • Published 5 years ago

js-hashrate-parser v0.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

js-hashrate-parser

Installation

npm install js-hashrate-parser

Usage

parse(hashrateString)

Accepts a hashrate string and will return a bignumber

const Hashrate = require('js-hashrate-parser');

Hashrate.parse('1 H/s'); // 1
Hashrate.parse('1 Sol/s'); // 1
Hashrate.parse('1 KH/s'); // 1000
Hashrate.parse('1 KSol/s'); // 1000

toString(hashrateNumber)

Accepts a hashrate number and returns a hashrate string. Input can be a string of a number, a number, or a bignumber.

const Hashrate = require('js-hashrate-parser');

Hashrate.toString(6589270000000000000); // 6.59 EH/s
Hashrate.toString('1000'); // 1 Kh/s
Hashrate.toString(new Bignumber(1)); // 1 H/s

https://www.poolminer.io

0.0.6

5 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago