n3 1.13.0 → 1.16.0
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.
- package/README.md +7 -2
- package/browser/n3.min.js +1 -1
- package/lib/N3DataFactory.js +6 -6
- package/lib/N3Lexer.js +25 -27
- package/lib/N3Store.js +32 -70
- package/lib/N3Util.js +1 -1
- package/package.json +1 -1
- package/src/N3DataFactory.js +6 -6
- package/src/N3Lexer.js +20 -9
- package/src/N3Store.js +34 -88
- package/src/N3Util.js +1 -1
package/README.md
CHANGED
|
@@ -293,8 +293,12 @@ store.addQuad(
|
|
|
293
293
|
namedNode('http://ex.org/Mouse')
|
|
294
294
|
);
|
|
295
295
|
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
// Retrieve all quads
|
|
297
|
+
for (const quad of store)
|
|
298
|
+
console.log(quad);
|
|
299
|
+
// Retrieve Mickey's quads
|
|
300
|
+
for (const quad of store.readQuads(namedNode('http://ex.org/Mickey'), null, null))
|
|
301
|
+
console.log(quad);
|
|
298
302
|
```
|
|
299
303
|
|
|
300
304
|
### Addition and deletion of quads
|
|
@@ -312,6 +316,7 @@ The store provides the following manipulation methods
|
|
|
312
316
|
### Searching quads or entities
|
|
313
317
|
The store provides the following search methods
|
|
314
318
|
([documentation](http://rdfjs.github.io/N3.js/docs/N3Store.html)):
|
|
319
|
+
- `readQuads` returns a generator of quads matching the given pattern
|
|
315
320
|
- `getQuads` returns an array of quads matching the given pattern
|
|
316
321
|
- `match` returns a stream of quads matching the given pattern
|
|
317
322
|
- `countQuads` counts the number of quads matching the given pattern
|