@builder.io/mitosis
Version:
Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io
15 lines (14 loc) • 412 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isHookEmpty = void 0;
const isHookEmpty = (hook) => {
var _a;
if (!hook) {
return true;
}
if (Array.isArray(hook)) {
return hook.every((h) => (0, exports.isHookEmpty)(h));
}
return !((_a = hook.code) === null || _a === void 0 ? void 0 : _a.trim());
};
exports.isHookEmpty = isHookEmpty;