diff --git a/src/components/NunjucksComponent.ts b/src/components/NunjucksComponent.ts index 4ed10a7..c21ef4c 100644 --- a/src/components/NunjucksComponent.ts +++ b/src/components/NunjucksComponent.ts @@ -6,6 +6,7 @@ import Controller from "../Controller"; import {ServerError} from "../HttpError"; import * as querystring from "querystring"; import {ParsedUrlQueryInput} from "querystring"; +import * as util from "util"; export default class NunjucksComponent extends ApplicationComponent { public static getPreviousURL(req: Request, defaultUrl?: string): string { @@ -52,6 +53,9 @@ export default class NunjucksComponent extends ApplicationComponent { .addGlobal('app_version', this.app!.getVersion()) .addGlobal('core_version', coreVersion) .addGlobal('querystring', querystring) + .addFilter('dump', (val) => { + return util.inspect(val); + }) .addFilter('hex', (v: number) => { return v.toString(16); });