mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 17:32:31 +00:00
17 lines
407 B
JavaScript
17 lines
407 B
JavaScript
|
|
export const getContext = function getContext(req, res) {
|
|
return { req, res }
|
|
}
|
|
|
|
export const determineGlobals = function determineGlobals(globalName, globals) {
|
|
const _globals = {}
|
|
for (const global in globals) {
|
|
if (typeof globals[global] === 'function') {
|
|
_globals[global] = globals[global](globalName)
|
|
} else {
|
|
_globals[global] = globals[global]
|
|
}
|
|
}
|
|
return _globals
|
|
}
|