Skip to content
Myr

app.locals.use(fn)

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 8d804a6 · Browse files · 1 file+6 added−0 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+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:lib/application.js+6 added
43 unmodified lines
44 this.settings = {};45 this.engines = {};46 this.redirects = {};47 this.isCallbacks = {};48 this.viewCallbacks = [];49 this.defaultConfiguration();5051 // route reflection methods52 methods.forEach(function(method){
36 unmodified lines
89 for (var key in obj) self.locals[key] = obj[key];90 return self;91 };9293 this.locals.use = function(fn){94 self.viewCallbacks.push(fn);95 return this;96 };9798 // expose objects to each other99 this.use(function(req, res, next){100 var charset;101 res.setHeader('X-Powered-By', 'Express');
484 unmodified lines