UNPKG

slack-webhooks-handler

Version:

Manage incoming webhooks to send messages to Slack

16 lines (11 loc) 283 B
import github from './github'; const factory = type => { const webhooks = { github }; if (!Object.keys(webhooks).includes(type)) { throw new Error(`Webhooks for [${type}] are not available`); } return webhooks[type]; } export default factory;