UNPKG

@botonic/plugin-contentful

Version:

## What Does This Plugin Do?

21 lines 794 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createMarkUp = void 0; const markdown_1 = require("./markdown"); const markup_1 = require("./markup"); const whatsapp_1 = require("./whatsapp"); function createMarkUp(type) { switch (type) { case markup_1.MarkupType.MARKDOWN: case markup_1.MarkupType.GITHUB: case markup_1.MarkupType.CONTENTFUL: return new markdown_1.Markdown(type); case markup_1.MarkupType.WHATSAPP: return new whatsapp_1.WhatsApp(); default: // eslint-disable-next-line @typescript-eslint/restrict-template-expressions throw Error(`Invalid markdup type: ${type}`); } } exports.createMarkUp = createMarkUp; //# sourceMappingURL=factories.js.map