astro-ghostcms/.pnpm-store/v3/files/fc/947ddb3a651b8807e89a6cc83e4...

23 lines
589 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
function getJSXPragmaInfo(options) {
const [base, suffix] = splitPragma(options.jsxPragma || "React.createElement");
const [fragmentBase, fragmentSuffix] = splitPragma(options.jsxFragmentPragma || "React.Fragment");
return {base, suffix, fragmentBase, fragmentSuffix};
} exports.default = getJSXPragmaInfo;
function splitPragma(pragma) {
let dotIndex = pragma.indexOf(".");
if (dotIndex === -1) {
dotIndex = pragma.length;
}
return [pragma.slice(0, dotIndex), pragma.slice(dotIndex)];
}