UNPKG

ndut-view

Version:

View Engine for Ndut Framework

12 lines (9 loc) 305 B
const iterator = require('./iterator') const handler = function (name, mod) { const { _ } = this.ndut.helper if (_.isFunction(mod)) mod = mod.call(this) this.ndutView.env.addExtension(name, mod) } module.exports = async function () { await iterator.call(this, 'extension', handler.bind(this)) }