More quoting nonsense

This commit is contained in:
Dustin Swan 2026-02-23 22:22:13 -07:00
parent d79166a5bc
commit 515ad7fc9c
No known key found for this signature in database
GPG key ID: 30D46587E2100467
5 changed files with 593 additions and 9 deletions

View file

@ -107,6 +107,15 @@ export const _rt = {
.filter(name => _rt.fuzzyMatch(query)(name)._tag === 'True')
.sort((a, b) => a.length - b.length);
},
getAt: (pathStr: string) => {
const parts = pathStr.split('.');
let obj: any = store[parts[0]];
for (let i = 1; i < parts.length; i++) {
if (obj === undefined || obj === null) return { _tag: 'None' };
obj = obj[parts[i]];
}
return obj === undefined ? { _tag: 'None' } : { _tag: 'Some', _0: obj };
},
getSource: (name: string) => {
const ast = definitions.get(name);
if (!ast) return "";