abs - Liquid Filter Reference - 0.10.11
Filter Name | abs |
Group | Numbers |
Version | 0.10.11 |
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 Liquid Reference for 0.10.11
Back to Documentation