New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

js-hashrate-parser

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-hashrate-parser

## Installation ```bash npm install js-hashrate-parser ```

latest
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 01 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts