mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.48k stars 635 forks source link

Error: filter not found: reject #1407

Closed aboutjquery closed 2 years ago

aboutjquery commented 2 years ago

I am using gulp-nunjucks-render and when I use the following code it returns this error.

Error: filter not found: reject

{% set numbers=[0, 1, 2, 3, 4, 5] %}
{{ numbers | reject("odd") | join }}

Is it because the plugin I'm using is too old? It was last updated 3 years ago.

Does it matter? If that's the reason I probably shouldn't be asking here, but I'm really wondering what plugins could replace it?

thank you all.

ogonkov commented 2 years ago

reject is supported from v3.2.2

aboutjquery commented 2 years ago

reject is supported from v3.2.2

gulp-nunjucks-render package.json show "nunjucks": "^3.1.2"

So the problem should be as you said, thank you, it seems to wait for the author of the plugin to update. :(

Thanks you.