Mercurial > code > home > repos > streamed-graph
diff src/tabulate.ts @ 94:a5f53d397526
view: pick types to show at top-level
author | drewp@bigasterisk.com |
---|---|
date | Wed, 12 Jan 2022 22:09:20 -0800 |
parents | ac7ad087d474 |
children | 26c55d5d5202 |
line wrap: on
line diff
--- a/src/tabulate.ts Wed Jan 12 20:26:57 2022 -0800 +++ b/src/tabulate.ts Wed Jan 12 22:09:20 2022 -0800 @@ -44,7 +44,7 @@ // When there are multiple types, an arbitrary one is used. export function groupByRdfType( graph: Store -): { byType: TypeToSubjs; typedSubjs: NamedNode[]; untypedSubjs: NamedNode[] } { +): { byType: TypeToSubjs; typesPresent: NamedNode[]; untypedSubjs: NamedNode[] } { let byType: TypeToSubjs = Immutable.Map(); let untyped: UriSet = Immutable.Set(); // subjs const internSubjs = new Map<string, NamedNode>(); @@ -73,12 +73,12 @@ null ); - const typedSubjs = Array.from(byType.keys()); - typedSubjs.sort(); + const typesPresent = Array.from(byType.keys()); + typesPresent.sort(); const untypedSubjs = Array.from(untyped.values()); untypedSubjs.sort(); - return { byType: byType, typedSubjs: typedSubjs, untypedSubjs: untypedSubjs }; + return { byType: byType, typesPresent: typesPresent, untypedSubjs: untypedSubjs }; } export function predsForSubj(graph: Store, typeUri: NamedNode): NamedNode[] {