sveldoc
Version:
Readme-driven Development for building Svelte components
20 lines (19 loc) • 832 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractComponentOptions = void 0;
const extractComponentOptions = (line) => {
var _a, _b, _c, _d, _e;
const blocks = /blocks:/.test(line)
? (_c = (_b = (_a = line.split("blocks:").pop()) === null || _a === void 0 ? void 0 : _a.split(" ").shift()) === null || _b === void 0 ? void 0 : _b.split(",")) !== null && _c !== void 0 ? _c : null
: null;
const no_eval = /no-eval/.test(line);
const height = /height:/.test(line)
? (_e = (_d = line.split("height:").pop()) === null || _d === void 0 ? void 0 : _d.split(" ").shift()) !== null && _e !== void 0 ? _e : null
: null;
return {
blocks,
no_eval,
height,
};
};
exports.extractComponentOptions = extractComponentOptions;
;