readable-number

1.0.0 • Public • Published

readable-number.js

Simple Javascript function to make an integer become readable and vice versa.

DEMO

Install

Include the readable-number.js to your HTML or web page file, Then it's ready to run. Or you can install via bower by run:

bower install readable-number-js

Or via NPM

npm install readable-number

Usage

// Return String
readNumber(10000); // 10,000
 
// Return Number
unReadNumber('10,000'); // 10000
 
// Test It
console.log(typeof readNumber(1000), readNumber(1000)); // string, '1,000'
console.log(typeof unReadNumber('10,000'), unReadNumber('10,000')); // number, 10000

Vue User?

You can download readable-number.js as a Vue Filter here OR as a Vue Directive Here Check it out!

Thank You for Making this useful~

Hopefully it can be useful for your next projects.

Let's talk about some projects

Just Contact Me At:

License

MIT Copyright (c) 2016 - forever Naufal Rabbani

Package Sidebar

Install

npm i readable-number

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bosnaufal