UNPKG

aws-delivlib

Version:

A fabulous library for defining continuous pipelines for building, testing and releasing code libraries.

17 lines (16 loc) 415 B
async function emitEvent(state, context) { const { name, action } = context; if (state.eventHandlers[`${name}.${action}`]) { for (const eventHandler of state.eventHandlers[`${name}.${action}`]) { await eventHandler(context); } } if (state.eventHandlers[name]) { for (const eventHandler of state.eventHandlers[name]) { await eventHandler(context); } } } export { emitEvent };