Liquid Filter Reference for abs - v0.9.5

Filter Name abs
Group Numbers
Version 0.9.5

Description

Returns the absolute value of a number.

Examples

When a negative number is provided:
{{ -17 | abs }}
17
When a positive number is provided:
{{ 4 | abs }}
4
When a string containing only a number is provided:
{{ "-19.86" | abs }}
19.86

Back to Filter List

Back to Liquid Reference for 0.9.5

 

 
Back to Documentation