jsonldjs 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,483 @@
1
+ /**
2
+ * Custom JSON-LD graph utilities
3
+ *
4
+ * Simple, focused functions for working with JSON-LD graph arrays.
5
+ * No external dependencies, no context expansion - just pure graph traversal.
6
+ */
7
+ /**
8
+ * Check if an entity matches a property filter selector
9
+ */
10
+ export function matchesSelector(entity, selector) {
11
+ // Global selector - matches everything
12
+ if (selector === '*')
13
+ return true;
14
+ // Empty object selector - matches everything
15
+ if (typeof selector === 'object' && Object.keys(selector).length === 0)
16
+ return true;
17
+ // Property-based matching
18
+ return Object.entries(selector).every(([property, expectedValue]) => {
19
+ const entityValue = entity[property];
20
+ // Handle array values - check if expectedValue is in the array
21
+ if (Array.isArray(entityValue)) {
22
+ return entityValue.includes(expectedValue);
23
+ }
24
+ // Handle object references - compare @id if expectedValue is an object with @id
25
+ if (typeof expectedValue === 'object' &&
26
+ expectedValue['@id'] &&
27
+ typeof entityValue === 'object' &&
28
+ entityValue['@id']) {
29
+ return entityValue['@id'] === expectedValue['@id'];
30
+ }
31
+ // Direct value comparison
32
+ return entityValue === expectedValue;
33
+ });
34
+ }
35
+ /**
36
+ * Find a single entity in the graph by @id
37
+ *
38
+ * @param graph - Array of JSON-LD entities
39
+ * @param id - The @id to search for
40
+ * @returns The entity if found, undefined otherwise
41
+ */
42
+ export function findEntity(graph, id) {
43
+ return graph.find((entity) => entity['@id'] === id);
44
+ }
45
+ /**
46
+ * Find multiple entities in the graph by @id
47
+ *
48
+ * @param graph - Array of JSON-LD entities
49
+ * @param ids - Array of @ids to search for
50
+ * @returns Array of found entities (may be fewer than requested if some not found)
51
+ */
52
+ export function findEntities(graph, ids) {
53
+ const idSet = new Set(ids);
54
+ return graph.filter((entity) => idSet.has(entity['@id']));
55
+ }
56
+ /**
57
+ * Find entities by @type
58
+ *
59
+ * @param graph - Array of JSON-LD entities
60
+ * @param type - The @type to search for
61
+ * @returns Array of entities matching the type
62
+ */
63
+ export function findEntitiesByType(graph, type) {
64
+ return graph.filter((entity) => {
65
+ const entityType = entity['@type'];
66
+ if (Array.isArray(entityType)) {
67
+ return entityType.includes(type);
68
+ }
69
+ return entityType === type;
70
+ });
71
+ }
72
+ /**
73
+ * Extract all @id references from an entity's properties
74
+ *
75
+ * @param entity - JSON-LD entity to scan
76
+ * @returns Set of @id strings found in the entity
77
+ */
78
+ export function extractReferences(entity) {
79
+ const references = new Set();
80
+ function scanValue(value) {
81
+ if (value === null || value === undefined) {
82
+ return;
83
+ }
84
+ if (typeof value === 'string') {
85
+ // Check if it looks like an @id reference using regex pattern
86
+ // Pattern: ^(?:[a-zA-Z][a-zA-Z0-9+.-]*:)?[^\s]+$
87
+ // This matches:
88
+ // - URIs with scheme: scheme:path (e.g., mailto:user@example.com)
89
+ // - Compact URIs: prefix:suffix (e.g., person:danlynch, org:hyperweb)
90
+ // - Must not contain spaces (filters out titles/descriptions with colons)
91
+ const idPattern = /^(?:[a-zA-Z][a-zA-Z0-9+.-]*:)[^\s]+$/;
92
+ // Additional checks:
93
+ // - Must match the pattern
94
+ // - Must contain a colon (to be a reference)
95
+ // - Exclude http/https URLs (handled separately)
96
+ if (idPattern.test(value) && value.includes(':') && !value.startsWith('http')) {
97
+ references.add(value);
98
+ }
99
+ return;
100
+ }
101
+ if (Array.isArray(value)) {
102
+ value.forEach(scanValue);
103
+ return;
104
+ }
105
+ if (typeof value === 'object') {
106
+ // If it has an @id, add it
107
+ if (value['@id']) {
108
+ references.add(value['@id']);
109
+ }
110
+ // Recursively scan all properties
111
+ Object.values(value).forEach(scanValue);
112
+ return;
113
+ }
114
+ }
115
+ // Scan all properties except @id and @type
116
+ Object.entries(entity).forEach(([key, value]) => {
117
+ if (key !== '@id' && key !== '@type') {
118
+ scanValue(value);
119
+ }
120
+ });
121
+ return references;
122
+ }
123
+ /**
124
+ * Extract a subgraph containing an entity and all its referenced entities
125
+ *
126
+ * Recursively finds all @id references within the entity and includes
127
+ * those entities in the result. Returns a filtered array of the original
128
+ * graph elements - does not modify the entities themselves.
129
+ *
130
+ * @param graph - Array of JSON-LD entities
131
+ * @param id - The root @id to start from
132
+ * @param propertyFilters - Optional property filtering configuration to apply before reference traversal
133
+ * @returns Array containing the root entity and all recursively referenced entities
134
+ */
135
+ export function extractSubgraph(graph, id, propertyFilters) {
136
+ const result = new Map();
137
+ const visited = new Set();
138
+ const toProcess = new Set([id]);
139
+ while (toProcess.size > 0) {
140
+ const currentId = toProcess.values().next().value;
141
+ toProcess.delete(currentId);
142
+ if (visited.has(currentId)) {
143
+ continue;
144
+ }
145
+ visited.add(currentId);
146
+ const entity = findEntity(graph, currentId);
147
+ if (!entity) {
148
+ continue;
149
+ }
150
+ // Apply property filtering to this specific entity as we encounter it
151
+ const filteredEntity = propertyFilters ? filterEntityProperties(entity, propertyFilters) : entity;
152
+ result.set(currentId, filteredEntity);
153
+ // Find all references in the filtered entity (only surviving properties)
154
+ const references = extractReferences(filteredEntity);
155
+ // Add unvisited references to process queue
156
+ references.forEach((refId) => {
157
+ if (!visited.has(refId)) {
158
+ toProcess.add(refId);
159
+ }
160
+ });
161
+ }
162
+ return Array.from(result.values());
163
+ }
164
+ /**
165
+ * Extract subgraphs for multiple root entities
166
+ *
167
+ * @param graph - Array of JSON-LD entities
168
+ * @param ids - Array of root @ids to start from
169
+ * @param propertyFilters - Optional property filtering configuration to apply before reference traversal
170
+ * @returns Array containing all entities and their recursively referenced entities
171
+ */
172
+ export function extractSubgraphs(graph, ids, propertyFilters) {
173
+ const allEntities = new Map();
174
+ ids.forEach((id) => {
175
+ const subgraph = extractSubgraph(graph, id, propertyFilters);
176
+ subgraph.forEach((entity) => {
177
+ allEntities.set(entity['@id'], entity);
178
+ });
179
+ });
180
+ return Array.from(allEntities.values());
181
+ }
182
+ /**
183
+ * Find entities that reference a specific @id
184
+ *
185
+ * @param graph - Array of JSON-LD entities
186
+ * @param targetId - The @id to find references to
187
+ * @param propertyFilters - Optional property filtering to apply before checking references
188
+ * @returns Array of entities that reference the target @id
189
+ */
190
+ export function findReferencingEntities(graph, targetId, propertyFilters) {
191
+ return graph
192
+ .filter((entity) => {
193
+ // Apply property filtering to this specific entity
194
+ const filteredEntity = propertyFilters ? filterEntityProperties(entity, propertyFilters) : entity;
195
+ // Check if the filtered entity references the target ID
196
+ const references = extractReferences(filteredEntity);
197
+ return references.has(targetId);
198
+ })
199
+ .map((entity) => {
200
+ // Return the filtered version of entities that match
201
+ return propertyFilters ? filterEntityProperties(entity, propertyFilters) : entity;
202
+ });
203
+ }
204
+ /**
205
+ * Extract a subgraph with limited depth traversal
206
+ *
207
+ * Unlike extractSubgraph which recursively follows all references,
208
+ * this function only traverses to a specified depth from the root entity.
209
+ *
210
+ * @param graph - Array of JSON-LD entities
211
+ * @param id - The root @id to start from
212
+ * @param maxDepth - Maximum depth to traverse (1 = direct references only)
213
+ * @param propertyFilters - Optional property filtering configuration to apply before reference traversal
214
+ * @returns Array containing entities up to the specified depth
215
+ */
216
+ export function extractSubgraphWithDepth(graph, id, maxDepth, propertyFilters) {
217
+ if (maxDepth < 1) {
218
+ return [];
219
+ }
220
+ const result = new Map();
221
+ const visited = new Set();
222
+ const toProcess = [{ id, depth: 0 }];
223
+ while (toProcess.length > 0) {
224
+ const current = toProcess.shift();
225
+ if (visited.has(current.id) || current.depth > maxDepth) {
226
+ continue;
227
+ }
228
+ visited.add(current.id);
229
+ const entity = findEntity(graph, current.id);
230
+ if (!entity) {
231
+ continue;
232
+ }
233
+ // Apply property filtering to this specific entity as we encounter it
234
+ const filteredEntity = propertyFilters ? filterEntityProperties(entity, propertyFilters) : entity;
235
+ result.set(current.id, filteredEntity);
236
+ // Only process references if we haven't reached max depth
237
+ if (current.depth < maxDepth) {
238
+ // Find all references in the filtered entity (only surviving properties)
239
+ const references = extractReferences(filteredEntity);
240
+ references.forEach((refId) => {
241
+ if (!visited.has(refId)) {
242
+ toProcess.push({ id: refId, depth: current.depth + 1 });
243
+ }
244
+ });
245
+ }
246
+ }
247
+ return Array.from(result.values());
248
+ }
249
+ /**
250
+ * Find all @id references that don't have corresponding entities in the graph
251
+ * @param graph - The JSON-LD graph to analyze
252
+ * @returns Array of missing @id references
253
+ */
254
+ export function findMissingReferences(graph) {
255
+ // First, collect all entity @ids that exist in the graph
256
+ const existingIds = new Set();
257
+ for (const entity of graph) {
258
+ if (entity['@id']) {
259
+ existingIds.add(entity['@id']);
260
+ }
261
+ }
262
+ // Then, collect all referenced @ids
263
+ const allReferences = new Set();
264
+ for (const entity of graph) {
265
+ const references = extractReferences(entity);
266
+ for (const ref of references) {
267
+ allReferences.add(ref);
268
+ }
269
+ }
270
+ // Find references that don't exist
271
+ const missing = [];
272
+ for (const ref of allReferences) {
273
+ if (!existingIds.has(ref)) {
274
+ missing.push(ref);
275
+ }
276
+ }
277
+ return missing.sort(); // Sort for consistent output
278
+ }
279
+ /**
280
+ * Find entities that contain nested objects (potential normalization candidates)
281
+ * @param graph - The JSON-LD graph to analyze
282
+ * @returns Array of objects with parent @id and details about nested entities
283
+ */
284
+ export function findNestedEntities(graph) {
285
+ const results = [];
286
+ function isNestedEntity(value) {
287
+ // Check if it's an object (not null, not array)
288
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
289
+ return false;
290
+ }
291
+ // Skip if it's just an @id reference (only has @id property)
292
+ if (Object.keys(value).length === 1 && value['@id']) {
293
+ return false;
294
+ }
295
+ // It's a nested entity if it has properties beyond just @id
296
+ return true;
297
+ }
298
+ function scanEntity(entity, parentId, basePath = '') {
299
+ for (const [key, value] of Object.entries(entity)) {
300
+ // Skip special JSON-LD properties
301
+ if (key.startsWith('@'))
302
+ continue;
303
+ const propertyPath = basePath ? `${basePath}.${key}` : key;
304
+ if (isNestedEntity(value)) {
305
+ results.push({
306
+ parentId: parentId,
307
+ property: propertyPath,
308
+ nestedEntity: value,
309
+ hasId: !!value['@id'],
310
+ });
311
+ // Recursively scan the nested entity
312
+ scanEntity(value, parentId, propertyPath);
313
+ }
314
+ else if (Array.isArray(value)) {
315
+ // Check arrays for nested entities
316
+ value.forEach((item, index) => {
317
+ if (isNestedEntity(item)) {
318
+ const arrayPath = `${propertyPath}[${index}]`;
319
+ results.push({
320
+ parentId: parentId,
321
+ property: arrayPath,
322
+ nestedEntity: item,
323
+ hasId: !!item['@id'],
324
+ });
325
+ // Recursively scan the nested entity in array
326
+ scanEntity(item, parentId, arrayPath);
327
+ }
328
+ });
329
+ }
330
+ }
331
+ }
332
+ for (const entity of graph) {
333
+ if (!entity['@id'])
334
+ continue;
335
+ scanEntity(entity, entity['@id']);
336
+ }
337
+ return results;
338
+ }
339
+ /**
340
+ * Find all entities that exist in the graph but are never referenced by other entities
341
+ * @param graph - The JSON-LD graph to analyze
342
+ * @returns Array of orphaned @id values
343
+ */
344
+ export function findOrphans(graph) {
345
+ // First, collect all entity @ids that exist in the graph
346
+ const allIds = new Set();
347
+ for (const entity of graph) {
348
+ if (entity['@id']) {
349
+ allIds.add(entity['@id']);
350
+ }
351
+ }
352
+ // Then, collect all referenced @ids
353
+ const referencedIds = new Set();
354
+ for (const entity of graph) {
355
+ const references = extractReferences(entity);
356
+ for (const ref of references) {
357
+ referencedIds.add(ref);
358
+ }
359
+ }
360
+ // Find entities that exist but are never referenced
361
+ const orphans = [];
362
+ for (const id of allIds) {
363
+ if (!referencedIds.has(id)) {
364
+ orphans.push(id);
365
+ }
366
+ }
367
+ return orphans.sort(); // Sort for consistent output
368
+ }
369
+ /**
370
+ * Inline all @id references within entities, replacing them with their full entity data
371
+ *
372
+ * This function takes an array of entities and recursively replaces all @id references
373
+ * with the actual entity data. If a specific root ID is provided, it returns only
374
+ * that entity with all its references inlined. Otherwise, it returns all entities
375
+ * with references inlined.
376
+ *
377
+ * @param entities - Array of JSON-LD entities
378
+ * @param rootId - Optional root entity @id to return (if not provided, returns all entities)
379
+ * @returns Either a single entity with inlined references or array of all entities with inlined references
380
+ */
381
+ export function inlineReferences(entities, rootId) {
382
+ // Create a lookup map for all entities
383
+ const entityMap = new Map();
384
+ entities.forEach((entity) => {
385
+ if (entity['@id']) {
386
+ entityMap.set(entity['@id'], entity);
387
+ }
388
+ });
389
+ // Function to recursively inline references with circular reference protection
390
+ function inlineValue(value, visited = new Set()) {
391
+ if (value === null || value === undefined) {
392
+ return value;
393
+ }
394
+ if (Array.isArray(value)) {
395
+ return value.map((v) => inlineValue(v, visited));
396
+ }
397
+ if (typeof value === 'object') {
398
+ // If it's an @id reference (object with only @id property), replace with the full entity
399
+ if (value['@id'] && Object.keys(value).length === 1) {
400
+ const id = value['@id'];
401
+ // Check for circular reference
402
+ if (visited.has(id)) {
403
+ // Return just the @id reference to break the cycle
404
+ return { '@id': id };
405
+ }
406
+ const referencedEntity = entityMap.get(id);
407
+ if (referencedEntity) {
408
+ // Add to visited set before processing
409
+ const newVisited = new Set(visited);
410
+ newVisited.add(id);
411
+ // Create a copy and inline its references
412
+ const copy = { ...referencedEntity };
413
+ return inlineValue(copy, newVisited);
414
+ }
415
+ }
416
+ // Otherwise, recursively process all properties
417
+ const result = {};
418
+ for (const [key, val] of Object.entries(value)) {
419
+ result[key] = inlineValue(val, visited);
420
+ }
421
+ return result;
422
+ }
423
+ return value;
424
+ }
425
+ // If a root ID is specified, return only that entity with inlined references
426
+ if (rootId) {
427
+ const mainEntity = entities.find((e) => e['@id'] === rootId);
428
+ if (!mainEntity) {
429
+ throw new Error(`Entity with @id "${rootId}" not found`);
430
+ }
431
+ return inlineValue(mainEntity);
432
+ }
433
+ // Otherwise, inline references in all entities
434
+ return entities.map((entity) => inlineValue(entity));
435
+ }
436
+ /**
437
+ * Apply property filtering to a single entity based on matching rules
438
+ */
439
+ export function filterEntityProperties(entity, config) {
440
+ // Collect all exclusions and inclusions from matching rules
441
+ let allExclusions = new Set();
442
+ let lastInclude;
443
+ // Apply rules in order - later rules override earlier ones
444
+ for (const rule of config) {
445
+ if (matchesSelector(entity, rule.selector)) {
446
+ // If this rule has include, it overrides previous includes
447
+ if (rule.include) {
448
+ lastInclude = rule.include;
449
+ }
450
+ // Accumulate exclusions
451
+ if (rule.exclude) {
452
+ rule.exclude.forEach((prop) => allExclusions.add(prop));
453
+ }
454
+ }
455
+ }
456
+ // Determine which properties to include
457
+ let propertiesToInclude;
458
+ if (lastInclude) {
459
+ // Start with explicitly included properties from the last matching include rule
460
+ propertiesToInclude = lastInclude.filter((prop) => prop in entity);
461
+ }
462
+ else {
463
+ // Include all existing properties
464
+ propertiesToInclude = Object.keys(entity);
465
+ }
466
+ // Remove all accumulated excluded properties (exclude takes precedence)
467
+ propertiesToInclude = propertiesToInclude.filter((prop) => !allExclusions.has(prop));
468
+ // Build filtered entity - always include @id
469
+ const filteredEntity = { '@id': entity['@id'] };
470
+ for (const prop of propertiesToInclude) {
471
+ if (prop !== '@id') {
472
+ // Don't overwrite @id
473
+ filteredEntity[prop] = entity[prop];
474
+ }
475
+ }
476
+ return filteredEntity;
477
+ }
478
+ /**
479
+ * Apply property filtering to all entities in a graph
480
+ */
481
+ export function filterGraphProperties(graph, config) {
482
+ return graph.map((entity) => filterEntityProperties(entity, config));
483
+ }
package/esm/types.js ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Types for the JSON-LD Builder API
3
+ *
4
+ * Provides comprehensive type definitions for the fluent builder interface
5
+ * that maintains compatibility with existing filtering logic while adding
6
+ * new configuration-first approach.
7
+ */
8
+ export {};
package/index.d.ts CHANGED
@@ -1,119 +1,5 @@
1
- /**
2
- * Custom JSON-LD graph utilities
3
- *
4
- * Simple, focused functions for working with JSON-LD graph arrays.
5
- * No external dependencies, no context expansion - just pure graph traversal.
6
- */
7
- export type JsonLdEntity = {
8
- '@id': string;
9
- '@type'?: string | string[];
10
- [key: string]: any;
11
- };
12
- export type JsonLdGraph = JsonLdEntity[];
13
- /**
14
- * Find a single entity in the graph by @id
15
- *
16
- * @param graph - Array of JSON-LD entities
17
- * @param id - The @id to search for
18
- * @returns The entity if found, undefined otherwise
19
- */
20
- export declare function findEntity(graph: JsonLdGraph, id: string): JsonLdEntity | undefined;
21
- /**
22
- * Find multiple entities in the graph by @id
23
- *
24
- * @param graph - Array of JSON-LD entities
25
- * @param ids - Array of @ids to search for
26
- * @returns Array of found entities (may be fewer than requested if some not found)
27
- */
28
- export declare function findEntities(graph: JsonLdGraph, ids: string[]): JsonLdEntity[];
29
- /**
30
- * Find entities by @type
31
- *
32
- * @param graph - Array of JSON-LD entities
33
- * @param type - The @type to search for
34
- * @returns Array of entities matching the type
35
- */
36
- export declare function findEntitiesByType(graph: JsonLdGraph, type: string): JsonLdEntity[];
37
- /**
38
- * Extract all @id references from an entity's properties
39
- *
40
- * @param entity - JSON-LD entity to scan
41
- * @returns Set of @id strings found in the entity
42
- */
43
- export declare function extractReferences(entity: JsonLdEntity): Set<string>;
44
- /**
45
- * Extract a subgraph containing an entity and all its referenced entities
46
- *
47
- * Recursively finds all @id references within the entity and includes
48
- * those entities in the result. Returns a filtered array of the original
49
- * graph elements - does not modify the entities themselves.
50
- *
51
- * @param graph - Array of JSON-LD entities
52
- * @param id - The root @id to start from
53
- * @returns Array containing the root entity and all recursively referenced entities
54
- */
55
- export declare function extractSubgraph(graph: JsonLdGraph, id: string): JsonLdEntity[];
56
- /**
57
- * Extract subgraphs for multiple root entities
58
- *
59
- * @param graph - Array of JSON-LD entities
60
- * @param ids - Array of root @ids to start from
61
- * @returns Array containing all entities and their recursively referenced entities
62
- */
63
- export declare function extractSubgraphs(graph: JsonLdGraph, ids: string[]): JsonLdEntity[];
64
- /**
65
- * Find entities that reference a specific @id
66
- *
67
- * @param graph - Array of JSON-LD entities
68
- * @param targetId - The @id to find references to
69
- * @returns Array of entities that reference the target @id
70
- */
71
- export declare function findReferencingEntities(graph: JsonLdGraph, targetId: string): JsonLdEntity[];
72
- /**
73
- * Extract a subgraph with limited depth traversal
74
- *
75
- * Unlike extractSubgraph which recursively follows all references,
76
- * this function only traverses to a specified depth from the root entity.
77
- *
78
- * @param graph - Array of JSON-LD entities
79
- * @param id - The root @id to start from
80
- * @param maxDepth - Maximum depth to traverse (1 = direct references only)
81
- * @returns Array containing entities up to the specified depth
82
- */
83
- export declare function extractSubgraphWithDepth(graph: JsonLdGraph, id: string, maxDepth: number): JsonLdEntity[];
84
- /**
85
- * Find all @id references that don't have corresponding entities in the graph
86
- * @param graph - The JSON-LD graph to analyze
87
- * @returns Array of missing @id references
88
- */
89
- export declare function findMissingReferences(graph: JsonLdGraph): string[];
90
- /**
91
- * Find entities that contain nested objects (potential normalization candidates)
92
- * @param graph - The JSON-LD graph to analyze
93
- * @returns Array of objects with parent @id and details about nested entities
94
- */
95
- export declare function findNestedEntities(graph: JsonLdGraph): Array<{
96
- parentId: string;
97
- property: string;
98
- nestedEntity: any;
99
- hasId: boolean;
100
- }>;
101
- /**
102
- * Find all entities that exist in the graph but are never referenced by other entities
103
- * @param graph - The JSON-LD graph to analyze
104
- * @returns Array of orphaned @id values
105
- */
106
- export declare function findOrphans(graph: JsonLdGraph): string[];
107
- /**
108
- * Inline all @id references within entities, replacing them with their full entity data
109
- *
110
- * This function takes an array of entities and recursively replaces all @id references
111
- * with the actual entity data. If a specific root ID is provided, it returns only
112
- * that entity with all its references inlined. Otherwise, it returns all entities
113
- * with references inlined.
114
- *
115
- * @param entities - Array of JSON-LD entities
116
- * @param rootId - Optional root entity @id to return (if not provided, returns all entities)
117
- * @returns Either a single entity with inlined references or array of all entities with inlined references
118
- */
119
- export declare function inlineReferences(entities: JsonLdGraph, rootId?: string): JsonLdEntity | JsonLdGraph;
1
+ export { createJsonLdConfig, JsonLdConfigBuilder } from './config';
2
+ export { createJsonLdBuilder, JsonLdBuilder } from './builder';
3
+ export type { JsonLdConfig, JsonLdFilterOptions, BuildOptions, PopulateConfig } from './types';
4
+ export { type JsonLdEntity, type JsonLdGraph, extractReferences, extractSubgraph, extractSubgraphWithDepth, extractSubgraphs, filterEntityProperties, filterGraphProperties, findEntities, findEntitiesByType, findEntity, findMissingReferences, findNestedEntities, findOrphans, findReferencingEntities, inlineReferences, } from './jsonld-utils';
5
+ export { filterJsonLdGraph } from './builder-utils';