How to use the messaging-api-common.pascalcase function in messaging-api-common

To help you get started, we’ve selected a few messaging-api-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Yoctol / bottender / packages / bottender / src / server / Server.ts View on Github external
.map(([channel, { path: webhookPath, ...channelConfig }]) => {
        // eslint-disable-next-line import/no-dynamic-require
        const ChannelBot = require(`../${channel}/${pascalcase(channel)}Bot`)
          .default;
        const channelBot = new ChannelBot({
          ...channelConfig,
          sessionStore,
        }) as Bot;

        initializeBot(channelBot);

        return {
          webhookPath: webhookPath || `/webhooks/${channel}`,
          bot: channelBot,
        };
      });