The Ruby on Rails and ClojureScript experts

May 17, 2012

JS library useful for adding a “human touch” to data.

Examples:

  • intcomma (4500000 = 4,500,000)
  • intword (1000000 = 1.0 million)
  • naturalDay (15 April 2012 16:25:30 = Today)
  • ordinal (3 = 3rd)
  • filesizeformat (1234567890 = 1.15 Gb)
  • linebreaks
  • linebreaksbr
  • pluralize (1, y, ies = y)
  • truncatechars (hello world, 10 = hello w…)
  • truncatewords (Playing with truncate words, 3 = Playing with truncate …)

Link: milanvrekic/JS-humanize via github.com