hsimp-named-number

Converts numbers to named named numbers

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
hsimp-named-number
500.1.38 years ago8 years agoMinified + gzip package size for hsimp-named-number in KB

Readme

How Secure Is My Password

Named Numbers

var namedNumber = require("named-number");
var number = namedNumber(20000000);

console.log(number.getName()); // "20 million"
console.log(number.getFormatted()); // "20,000,000"
console.log(number.getSignificand()); // 2
console.log(number.getExponent()); // 7
console.log(number + 1); // 20000001
console.log("Result: " + number); // "Result: 20,000,000"