abs

Filter = abs

Returns the absolute value of a number:

INPUT

OUTPUT

{{ -17 | abs }}

17

INPUT

OUTPUT

{{ 4 | abs }}

4

abs will also work on a string that only contains a number:

INPUT

OUTPUT

{{ "-19.86" | abs }}

19.86