|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
589 bytes
|
| Rev | Line | |
|---|
| [9af201e] | 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 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.