readable-number
v1.0.0
Published
Simple Javascript function to make an integer become readable and vice versa
Downloads
7
Maintainers
Readme
readable-number.js
Simple Javascript function to make an integer become readable and vice versa.
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:
- Email: [email protected]
- Skype Id: bosnaufal254
- twitter: @BosNaufal
License
MIT Copyright (c) 2016 - forever Naufal Rabbani