comparison src/parseRdf.ts @ 21:a90cb6927c7d default tip

fix countdown queries. Display "now" instead of "In -0.4 hours"
author drewp@bigasterisk.com
date Sat, 07 Sep 2024 17:47:36 -0700
parents 20d1fa4250c0
children
comparison
equal deleted inserted replaced
20:e8c90d893919 21:a90cb6927c7d
5 export function getLiteral(store: Store, graph: Term, subj: Quad_Subject, pred: Quad_Predicate, missing: string | null): string { 5 export function getLiteral(store: Store, graph: Term, subj: Quad_Subject, pred: Quad_Predicate, missing: string | null): string {
6 let out = null; 6 let out = null;
7 store.getObjects(subj, pred, graph).forEach((attr) => { 7 store.getObjects(subj, pred, graph).forEach((attr) => {
8 out = attr.value; 8 out = attr.value;
9 }); 9 });
10 if (!out) { 10 if (out == null) {
11 if (missing === null) { 11 if (missing === null) {
12 throw new Error(); 12 throw new Error();
13 } 13 }
14 return missing; 14 return missing;
15 } 15 }