Skip to content
Myr

refactored dynamicHelper support

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent a094c50 · Browse files · 1 file+5 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−10 removed

  • other:+5 added−10 removed

1 file+5 added−10 removed

modified:lib/express/view.js+5 added-10 removed
407 unmodified lines
408 if (false !== options.dynamicHelpers) {409 // cache410 if (!this.__dynamicHelpers) {411 this.__dynamicHelpers = {};412 var keys = Object.keys(dynamicHelpers);413 for (var i = 0, len = keys.length; i < len; ++i) {414 var key = keys[i]415 , val = dynamicHelpers[key];416 if (typeof val === 'function') {417 this.__dynamicHelpers[key] = val.call(418 this.app419 , this.req420 , this);412 for (var key in dynamicHelpers) {413 this.__dynamicHelpers[key] = dynamicHelpers[key].call(414 this.app415 , this.req416 , this);421 }417 }418 }419420 // apply
40 unmodified lines