Liking cljdoc? Tell your friends :D

wet.filters


absclj/s

(abs v)

Returns the absolute value of a number.

Returns the absolute value of a number.
sourceraw docstring

appendclj/s

(append v & args)
source

capitalizeclj/s

(capitalize v)

Makes the first character of a string capitalized.

Makes the first character of a string capitalized.
sourceraw docstring

ceilclj/s

(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.
sourceraw docstring

compactclj/s

(compact v)

Removes any nil values from a collection.

Removes any nil values from a collection.
sourceraw docstring

CORE-FILTERSclj/s

source

dateclj/s

(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.
sourceraw docstring

defaultclj/s

(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.
sourceraw docstring

divided-byclj/s

(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.
sourceraw docstring

downcaseclj/s

(downcase v)

Makes each character in a string lowercase.

Makes each character in a string lowercase.
sourceraw docstring

escapeclj/s

(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.
sourceraw docstring

escape-onceclj/s

(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.
sourceraw docstring

firstclj/s

(first v)

Returns the first item of a collection.

Returns the first item of a collection.
sourceraw docstring

floorclj/s

(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.
sourceraw docstring

joinclj/s

(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.
sourceraw docstring

lastclj/s

(last v)

Returns the last item of a collection.

Returns the last item of a collection.
sourceraw docstring

lstripclj/s

(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.
sourceraw docstring

mapclj/s

(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.
sourceraw docstring

minusclj/s

(minus v n)

Subtracts a number from another number.

Subtracts a number from another number.
sourceraw docstring

moduloclj/s

(modulo v n)

Returns the remainder of a division operation.

Returns the remainder of a division operation.
sourceraw docstring

newline-to-brclj/s

(newline-to-br v)

Replaces every newline (\n) with an HTML line break (<br>).

Replaces every newline (\n) with an HTML line break (<br>).
sourceraw docstring

plusclj/s

(plus & args)

Adds a number to another number.

Adds a number to another number.
sourceraw docstring

prependclj/s

(prepend v s)

Adds the specified string to the beginning of another string.

Adds the specified string to the beginning of another string.
sourceraw docstring

removeclj/s

(remove v s)

Removes every occurrence of the specified substring from a string.

Removes every occurrence of the specified substring from a string.
sourceraw docstring

remove-firstclj/s

(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.
sourceraw docstring

replaceclj/s

(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.
sourceraw docstring

replace-firstclj/s

(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.
sourceraw docstring

reverseclj/s

(reverse v)

Reverses the order of the items in an array.

Reverses the order of the items in an array.
sourceraw docstring

roundclj/s

(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.
sourceraw docstring

rstripclj/s

(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.
sourceraw docstring

sizeclj/s

(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.
sourceraw docstring

sliceclj/s

(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.
sourceraw docstring

sortclj/s

(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.
sourceraw docstring

sort-naturalclj/s

(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.
sourceraw docstring

splitclj/s

(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.
sourceraw docstring

stripclj/s

(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.
sourceraw docstring

strip-htmlclj/s

(strip-html v)

Removes any HTML tags from a string.

Removes any HTML tags from a string.
sourceraw docstring

strip-newlinesclj/s

(strip-newlines v)

Removes any newline characters (line breaks) from a string.

Removes any newline characters (line breaks) from a string.
sourceraw docstring

timesclj/s

(times & args)

Multiplies a number by another number.

Multiplies a number by another number.
sourceraw docstring

truncateclj/s

(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.
sourceraw docstring

truncatewordsclj/s

(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.
sourceraw docstring

uniqclj/s

(uniq v)

Removes any duplicate elements in an array.

Removes any duplicate elements in an array.
sourceraw docstring

upcaseclj/s

(upcase v)

Makes each character in a string uppercase.

Makes each character in a string uppercase.
sourceraw docstring

url-decodeclj/s

(url-decode v)

Decodes a string that has been encoded as a URL.

Decodes a string that has been encoded as a URL.
sourceraw docstring

url-encodeclj/s

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close