Filters let you pipe the data from a reference (either global or helper) through some predefined functions.

Basic Syntax


Squirrelly has a filter syntax similar to Nunjucks or Swig. Just put a | and then the filter name. You can pipe a reference to multiple filters if you want.


{{mystring | reverse | capitalize}}
Defining Filters

Remember, you'll need to define each filter before you use it.

The safe flag

To disable autoescaping, you can write

{{myreference | safe}}

This isn't a true filter, it just acts as a flag to let Squirrelly know not to autoescape.

Last updated on by Ben Gubler