Skip to content
Myr

Merge branch 'view-helpers' into connect

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 · parents 09147a2, bc5d31f · Browse files · 3 files+24 added−1 removed
This commit

State

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

Diff stats

3 files+24 added−1 removed

  • tests:+13 added−1 removed
  • other:+11 added−0 removed

3 files+24 added−1 removed

modified:lib/express/view.js+11 added
43 unmodified lines
44 viewCache = {};45};4647/**48 * View helpers merged with each render's locals.49 *50 * @type Object51 */5253var helpers = exports.helpers = {};5455/**56 * Cache view at the given `path`.57 *58 * @param {String} padth59 * @return {String}
174 unmodified lines
234 // Always expose partial() as a local235 options.locals.partial = function(view, options){236 return self.partial.call(self, view, options, ext);237 };238 239 // Merge view helpers240 utils.merge(options.locals, helpers);241242 function error(err) {243 if (fn) {244 fn(err);
35 unmodified lines
added:test/fixtures/helpers.jade+1 added
1p= reverse('reverse')
modified:test/view.test.js+12 added-1 removed