MaketRandevu/application/views/components/js_vars_script.php
2022-01-18 10:43:40 +01:00

14 lines
280 B
PHP

<script>
window.vars = (function () {
const vars = <?= json_encode(script_vars()) ?>;
return (key) => {
if (!key) {
return vars;
}
return vars[key] || undefined;
};
})();
</script>