0.0.1 • Published 7 years ago

d3-format-india v0.0.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
7 years ago

d3-format-india

Indian Number System formatter.

Installing

If you use NPM, npm install d3-format-india. Otherwise, download the latest release.

API Reference

# formatIndia(value)

Formats the given number value using the Indian Number System. For example:

var formatIndia = require("d3-format-india").formatIndia;

console.log(format(10)); // Prints "10"
console.log(format(100)); // Prints "100"
console.log(format(1000)); // Prints "1,000"
console.log(format(10000)); // Prints "10,000"
console.log(format(100000)); // Prints "1,00,000"
console.log(format(1000000)); // Prints "10,00,000"
console.log(format(10000000)); // Prints "1,00,00,000"
console.log(format(10000000.4543)); // Prints "1,00,00,000.4543"
console.log(format(-1000000)); // Prints "-10,00,000"
console.log(format(-10000000.4543)); // Prints "-1,00,00,000.4543"
0.0.1

7 years ago