No commit activity in last 3 years
No release in over 3 years
A liquid filter to make numbers more human readable
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 4.0
~> 3.5
 Project Readme

Liquid Humanize Number

A liquid filter to make numbers more human readable.

Installation

Rails, Rack, etc with bundler

Add the following to your Gemfile:

gem 'liquid-humanize-number', '~> 1.0'

Run

bundle install

Jekyll

On Jeykll it is best to add 'liquid-humanize-number' to the gems list in your _site.yml file.

Usage

liquid-humanize-number provides a single filter. humanize_number

You can use it without any arguments to group digits by thousands with commas.

Example:

  template = Liquid::Template.parse('{{value | humanize_number }}')
  template.render('value' => 10000) # "10,000"

You can supply a separator and grouping method. Currently "thousands" is the only supported grouping method.