Skip to content

Instantly share code, notes, and snippets.

@dataday
Created August 24, 2017 12:58
Show Gist options
  • Save dataday/cb7ae6d03475e43374d939aaf7c2539e to your computer and use it in GitHub Desktop.
Save dataday/cb7ae6d03475e43374d939aaf7c2539e to your computer and use it in GitHub Desktop.
nunjucksRender Filters
...
nunjucksRender: {
manageEnv: function(env) {
const utils = new Utils();
env.addFilter('split', utils.splitFilter);
env.addFilter('get', utils.getFilter);
env.addFilter('is', utils.isFilter);
env.addFilter('classify', utils.classifyFilter);
}
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment