Jensen-holm's picture
added baseline stuff for making this a flask app with tailwind
a63e09b
raw
history blame
207 Bytes
export default function dlv(obj, key, def, p, undef) {
key = key.split ? key.split('.') : key;
for (p = 0; p < key.length; p++) {
obj = obj ? obj[key[p]] : undef;
}
return obj === undef ? def : obj;
}