Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* @param key
* The key to search for in the headers.
*
* @return
* The header value if found or false.
*/
getHeader(req, key) {
if (typeof req.headers[key] !== 'undefined') {
return req.headers[key];
}
return false;
},
flattenComponentsForRender: workerUtils.flattenComponentsForRender.bind(workerUtils),
renderFormSubmission: workerUtils.renderFormSubmission.bind(workerUtils),
renderComponentValue: workerUtils.renderComponentValue.bind(workerUtils),
/**
* Search the request query for the given key.
*
* @param req
* The Express request object.
* @param key
* The key to search for in the query.
*
* @return
* The query value if found or false.
*/
getQuery(req, key) {
if (typeof req.query[key] !== 'undefined') {
return req.query[key];