0.1.9 • Published 2 years ago

live-number-format v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

liveNumberFormat.js

A tiny Javascript library that gives live as-you-type formatting to numbers & currencies, ~1600 bytes minified + gzipped.

View demo

output

Check the demo source.

Usage

npm i live-number-format

Default values for config shown below.

let input = document.querySelector("input");
new LiveNumberFormat(input,
{
        // Options for formatStyle
        // 1. thousandLakhCrore
        // 2. thousand
        // 3. tenThousand
        formatStyle: "thousand",

        stripLeadingZeroes: false,

        allowNegative: true,

        // Max integers allowed.
        // defaults to Infinity
        integerScale: 20,

        // Max decimals allowed.
        // defaults to Infinity
        decimalScale: 7
});
0.1.8

2 years ago

0.1.9

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago