fileoverview /**
 * The names of modules to load are stored as a comma-delimited string in the
 * `MODULES` env var.
 */ const moduleNames = process . env . MODULES . split ( ',' ) ; /**
 * The array of imported modules.
 */ const modules = moduleNames . map ( name => require ( `./${ name }` ) ) ; see https param { object } event returns exports . handler = async ( event ) => { /**
     * Instead of naively iterating over all handlers, run them concurrently with
     * `await Promise.all(...)`. This would otherwise just be determined by the
     * order of names in the `MODULES` var.
     */ await Promise . all ( modules . map ( module => module . handler ( event ) ) ) ; return event ; } ;