• .
  • Chúc mừng giánh sinh và năm mới 2025
  • Smallrig phu kien ho tro quay gan gimbal rs3 rs2 rsc2.jpg
  • Balo túi đeo PGYTECH 3L 4L 6L 10L 11L 22L 25L 35L
  • Tilta Phụ kiện các loại giá tốt nhất
  • Hỗ trợ book Xanh SM giao liền

Numeral.js - Jquery format numbers theo nhiều dạng khác nhau

What do you do to format 1000 to 1,000 using Javascript? If you are a programmer, you may write a custom function to find length of the number and insert commas at required places. Numeral.js makes this task easy for you. It is a pure Javascript library for formatting and manipulating numbers. It does not have any dependencies and therefore it is very fast and right to the point.

Numeral.js

Numeral.js Features

  • It is a pure Javascript library and does not depend on any other libraries like jQuery.
  • You can download and use the library from your own server or you can directly use the cdn link hosted in cdnjs.com
  • You can also install the library in node.js
  • Formatting a number is as easy as calling the format function with needed format given as argument. Visit the source link to know complete details of formatting options.
  • The library can easily handle currencies, bytes, percentages and time. It can also unformat a formatted string back to number
  • The library also includes ready made functions to add, subtract, multiply and divide
Share facebookShare facebook

Bạn đã đọc tin này chưa ?

Go Top
Chat hỗ trợ
Chat ngay