You can use Numerals in the browser and in Node.js. Create an instance of a numeral, Numeral takes numbers or strings that it trys to convert into a number. Numbers can be formatted to look like currency, percentages, times, or even plain old numbers with decimal places, thousands, and abbreviations. And you can always create a custom format. Set a default format so you can use .format() without a string. The default format to '0,0'. Set a custom output when formatting numerals with a value of 0 or null. Adding your own custom formats is as easy as adding a locale. Numeral.js, while less complex, was inspired by and heavily borrowed from Moment.js Formats now exist in their own files and act more or less as plugins. Check out the bytes format for an example of how to create one. When naming locale files use the ISO 639-1 language codes supplemented by ISO 3166-1 country codes when necessary.

Features

  • Use it in the browser and in Node.js
  • Create an instance of a numeral, Numeral takes numbers or strings that it trys to convert into a number
  • Numbers can be formatted to look like currency, percentages, times, or even plain old numbers with decimal places
  • Find the difference between your numeral object and a value
  • Go ahead and clone any numeral object while you're at it
  • Set a default format so you can use .format() without a string

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Numeral.js

Numeral.js Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Numeral.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Data Formats Software, JavaScript Libraries

Registered

2021-06-29