UNPKG

shawerma

Version:
18 lines (13 loc) 349 B
'use strict' const normalize = (event) => { // it's still only a shallow copy (clone) // of the original event const normEvent = {...event} const headers = {} for (let header in event.headers) { headers[header.toLowerCase()] = event.headers[header] } normEvent.headers = headers return normEvent } module.exports = normalize