elm-native-library/elm-code-wrap-loader.js

13 lines
231 B
JavaScript
Raw Normal View History

2023-01-05 11:16:48 +03:00
function wrapElmCode(code) {
return `
function wrapper() {
let output = {};
(function () { ${code} }).call(output);
return output.Elm;
}
export default wrapper;
`;
}
module.exports = wrapElmCode;