abs - Liquid Filter Reference - 1.0.0

Filter Name abs
Group Numbers
Version 1.0.0

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 1.0.0

 

 
Back to Documentation