UNPKG

@builder.io/mitosis

Version:

Write components once, run everywhere. Compiles to Vue, React, Solid, and Liquid. Import code from Figma and Builder.io

16 lines (15 loc) 425 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addToOnInitHook = void 0; function addToOnInitHook(json, code) { var _a; if ((_a = json.hooks.onInit) === null || _a === void 0 ? void 0 : _a.code.length) { json.hooks.onInit.code += `\n ${code}`; } else { json.hooks.onInit = { code, }; } } exports.addToOnInitHook = addToOnInitHook;