npm.io
1.0.2 • Published 8 years ago

bfcounter

Licence
ISC
Version
1.0.2
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
2

Big F(ast) Counter

Fast increment and decrement operations for big numbers represented as strings.

Installation

With npm: npm install --save bfcounter

With yarn: yarn add bfcounter

Usage

const bfc = require("bfcounter");

var counter = "100000000000000000000000000000000000000000000000000";

var incremented = bfc.increment(counter); // "100000000000000000000000000000000000000000000000001"

var decremented = bfc.decrement(incremented); // "100000000000000000000000000000000000000000000000000"

Keywords