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
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime Icon
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime

General-purpose, compute-optimized, or GPU/TPU-accelerated. Built to your exact specs.

Live migration and automatic failover keep workloads online through maintenance. One free e2-micro VM every month.
Try 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