1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.hasDocgen = hasDocgen;
|
7 | exports.isValidDocgenSection = isValidDocgenSection;
|
8 | exports.getDocgenSection = getDocgenSection;
|
9 | exports.getDocgenDescription = getDocgenDescription;
|
10 |
|
11 | require("core-js/modules/es.object.keys.js");
|
12 |
|
13 | require("core-js/modules/es.symbol.js");
|
14 |
|
15 | require("core-js/modules/es.symbol.description.js");
|
16 |
|
17 | var _string = require("./string");
|
18 |
|
19 |
|
20 | function hasDocgen(component) {
|
21 | return !!component.__docgenInfo;
|
22 | }
|
23 |
|
24 | function isValidDocgenSection(docgenSection) {
|
25 | return docgenSection != null && Object.keys(docgenSection).length > 0;
|
26 | }
|
27 |
|
28 | function getDocgenSection(component, section) {
|
29 | return hasDocgen(component) ? component.__docgenInfo[section] : null;
|
30 | }
|
31 |
|
32 | function getDocgenDescription(component) {
|
33 | return hasDocgen(component) && (0, _string.str)(component.__docgenInfo.description);
|
34 | } |
\ | No newline at end of file |