xoxys.general/plugins/filters/prefix.py

12 lines
207 B
Python
Raw Normal View History

2020-08-18 13:10:09 +00:00
"""Filter to prefix all itams from a list."""
def prefix(value, prefix="--"):
return [prefix + x for x in value]
class FilterModule(object):
def filters(self):
return {"prefix": prefix}