1 | "use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | function getJSXPragmaInfo(options) {
|
11 | const [base, suffix] = splitPragma(options.jsxPragma || "React.createElement");
|
12 | const [fragmentBase, fragmentSuffix] = splitPragma(options.jsxFragmentPragma || "React.Fragment");
|
13 | return {base, suffix, fragmentBase, fragmentSuffix};
|
14 | } exports.default = getJSXPragmaInfo;
|
15 |
|
16 | function splitPragma(pragma) {
|
17 | let dotIndex = pragma.indexOf(".");
|
18 | if (dotIndex === -1) {
|
19 | dotIndex = pragma.length;
|
20 | }
|
21 | return [pragma.slice(0, dotIndex), pragma.slice(dotIndex)];
|
22 | }
|