* Allow `appAttributes` to be a function for lazy-instantiation based on `req` and `res`.
(attrs, req, res)
| 33 | * Allow `appAttributes` to be a function for lazy-instantiation based on `req` and `res`. |
| 34 | */ |
| 35 | function getAppAttributes(attrs, req, res) { |
| 36 | if (typeof attrs === 'function') { |
| 37 | attrs = attrs(req, res); |
| 38 | } |
| 39 | return attrs || {}; |
| 40 | } |
| 41 | |
| 42 | var attributes = getAppAttributes(appAttributes, req, res); |
| 43 |