feat: add unregisterFilter method (#946)

* feat: add unregisterFilter method

* docs: show how to re-register built-in filters

---------

Co-authored-by: Yacov <yacov@noemail>
This commit is contained in:
YacovGold
2026-08-11 19:58:25 +08:00
committed by GitHub
co-authored by Yacov
parent 88ae297c1b
commit 69b2c589f9
3 changed files with 52 additions and 2 deletions
+3
View File
@@ -101,6 +101,9 @@ export class Liquid {
public registerFilter (name: string, filter: FilterImplOptions) {
this.filters[name] = filter
}
public unregisterFilter (name: string) {
delete this.filters[name]
}
public registerTag (name: string, tag: TagClass | TagImplOptions) {
this.tags[name] = isFunction(tag) ? tag : createTagClass(tag)
}