Skip to content

Instantly share code, notes, and snippets.

View joaquimnetocel's full-sized avatar

Joaquim Henriques joaquimnetocel

View GitHub Profile
@jherr
jherr / runify.js
Created September 22, 2023 21:54
runify.js
export function runify(obj) {
if(Array.isArray(obj)) {
return obj.map(runify);
} else if(typeof obj === 'object') {
let rune = $state(obj);
let output = {};
for(let key in rune) {
if(typeof obj[key] === 'object') {
obj[key] = runify(obj[key]);
}