(abs v)
Returns the absolute value of a number.
Returns the absolute value of a number.
(capitalize v)
Makes the first character of a string capitalized.
Makes the first character of a string capitalized.
(ceil v)
Rounds the input up to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
Rounds the input up to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
(compact v)
Removes any nil values from a collection.
Removes any nil values from a collection.
(date v fmt)
Converts a timestamp into another date format. The format for the syntax is the same as strftime.
Converts a timestamp into another date format. The format for the syntax is the same as strftime.
(default v fallback)
Allows you to specify a fallback in case a value doesn’t exist.
Allows you to specify a fallback in case a value doesn’t exist.
(divided-by v divisor)
Divides a number by the specified number. The result is rounded down to the nearest integer (that is, the floor) if the divisor is an integer.
Divides a number by the specified number. The result is rounded down to the nearest integer (that is, the floor) if the divisor is an integer.
(downcase v)
Makes each character in a string lowercase.
Makes each character in a string lowercase.
(escape v)
Escapes a string by replacing characters with escape sequences (so that the string can be used in a URL, for example). It doesn’t change strings that don’t have anything to escape.
Escapes a string by replacing characters with escape sequences (so that the string can be used in a URL, for example). It doesn’t change strings that don’t have anything to escape.
(escape-once v)
Escapes a string without changing existing escaped entities. It doesn’t change strings that don’t have anything to escape.
Escapes a string without changing existing escaped entities. It doesn’t change strings that don’t have anything to escape.
(first v)
Returns the first item of a collection.
Returns the first item of a collection.
(floor v)
Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
Rounds a number down to the nearest whole number. Liquid tries to convert the input to a number before the filter is applied.
(join v separator)
Combines the items in an array into a single string using the argument as a separator.
Combines the items in an array into a single string using the argument as a separator.
(last v)
Returns the last item of a collection.
Returns the last item of a collection.
(lstrip v)
Removes all whitespaces (tabs, spaces, and newlines) from the beginning of a string. The filter does not affect spaces between words.
Removes all whitespaces (tabs, spaces, and newlines) from the beginning of a string. The filter does not affect spaces between words.
(map v key)
Creates a collection of values by extracting the values of a named property from another object.
Creates a collection of values by extracting the values of a named property from another object.
(minus v n)
Subtracts a number from another number.
Subtracts a number from another number.
(modulo v n)
Returns the remainder of a division operation.
Returns the remainder of a division operation.
(newline-to-br v)
Replaces every newline (\n) with an HTML line break (<br>).
Replaces every newline (\n) with an HTML line break (<br>).
(plus & args)
Adds a number to another number.
Adds a number to another number.
(prepend v s)
Adds the specified string to the beginning of another string.
Adds the specified string to the beginning of another string.
(remove v s)
Removes every occurrence of the specified substring from a string.
Removes every occurrence of the specified substring from a string.
(remove-first v s)
Removes only the first occurrence of the specified substring from a string.
Removes only the first occurrence of the specified substring from a string.
(replace v match replacement)
Replaces every occurrence of an argument in a string with the second argument.
Replaces every occurrence of an argument in a string with the second argument.
(replace-first v match replacement)
Replaces only the first occurrence of the first argument in a string with the second argument.
Replaces only the first occurrence of the first argument in a string with the second argument.
(reverse v)
Reverses the order of the items in an array.
Reverses the order of the items in an array.
(round v)
(round v precision)
Rounds an input number to the nearest integer or, if a number is specified as an argument, to that number of decimal places.
Rounds an input number to the nearest integer or, if a number is specified as an argument, to that number of decimal places.
(rstrip v)
Removes all whitespace (tabs, spaces, and newlines) from the right side of a string.
Removes all whitespace (tabs, spaces, and newlines) from the right side of a string.
(size v)
Returns the number of characters in a string or the number of items in an array.
Returns the number of characters in a string or the number of items in an array.
(slice v start)
(slice v start length)
Returns a substring of 1 character beginning at the index specified by the argument passed in. An optional second argument specifies the length of the substring to be returned. String indices are numbered starting from 0.
Returns a substring of 1 character beginning at the index specified by the argument passed in. An optional second argument specifies the length of the substring to be returned. String indices are numbered starting from 0.
(sort v)
Sorts items in an array by a property of an item in the array. The order of the sorted array is case-sensitive.
Sorts items in an array by a property of an item in the array. The order of the sorted array is case-sensitive.
(sort-natural v)
Sorts items in an array by a property of an item in the array.
Sorts items in an array by a property of an item in the array.
(split v separator)
Divides an input string into an array using the argument as a separator.
Divides an input string into an array using the argument as a separator.
(strip v)
Removes all whitespace (tabs, spaces, and newlines) from both the left and right side of a string. It does not affect spaces between words.
Removes all whitespace (tabs, spaces, and newlines) from both the left and right side of a string. It does not affect spaces between words.
(strip-html v)
Removes any HTML tags from a string.
Removes any HTML tags from a string.
(strip-newlines v)
Removes any newline characters (line breaks) from a string.
Removes any newline characters (line breaks) from a string.
(times & args)
Multiplies a number by another number.
Multiplies a number by another number.
(truncate v n)
(truncate v n ellipsis)
Shortens a string down to the number of characters passed as a parameter. If the number of characters specified is less than the length of the string, an ellipsis (…) is appended to the string and is included in the character count.
Shortens a string down to the number of characters passed as a parameter. If the number of characters specified is less than the length of the string, an ellipsis (…) is appended to the string and is included in the character count.
(truncatewords v n)
(truncatewords v n ellipsis)
Shortens a string down to the number of words passed as the argument. If the specified number of words is less than the number of words in the string, an ellipsis (…) is appended to the string.
Shortens a string down to the number of words passed as the argument. If the specified number of words is less than the number of words in the string, an ellipsis (…) is appended to the string.
(uniq v)
Removes any duplicate elements in an array.
Removes any duplicate elements in an array.
(upcase v)
Makes each character in a string uppercase.
Makes each character in a string uppercase.
(url-decode v)
Decodes a string that has been encoded as a URL.
Decodes a string that has been encoded as a URL.
(url-encode v)
Converts any URL-unsafe characters in a string into percent-encoded characters.
Converts any URL-unsafe characters in a string into percent-encoded characters.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close