mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
e7cc2757c3
Co-authored-by: Alexander Lichter <manniL@gmx.net>
17 lines
409 B
JavaScript
17 lines
409 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
|
|
}
|