n3 2.6.1 → 2.6.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.
package/lib/N3Store.js CHANGED
@@ -1085,10 +1085,9 @@ class N3Store {
1085
1085
  }
1086
1086
 
1087
1087
  // ### Store is an iterable.
1088
- // Can be used where iterables are expected: for...of loops, array spread operator,
1089
- // `yield*`, and destructuring assignment (order is not guaranteed).
1090
- *[Symbol.iterator]() {
1091
- yield* this.readQuads();
1088
+ // Returns the quad iterator directly; order is not guaranteed.
1089
+ [Symbol.iterator]() {
1090
+ return this.readQuads();
1092
1091
  }
1093
1092
  }
1094
1093
 
@@ -1267,7 +1266,7 @@ class DatasetCoreAndReadableStream extends _readableStream.Readable {
1267
1266
  match(subject, predicate, object, graph) {
1268
1267
  return new DatasetCoreAndReadableStream(this.filtered, subject, predicate, object, graph, this.options);
1269
1268
  }
1270
- *[Symbol.iterator]() {
1271
- yield* this._filtered || this.n3Store.readQuads(this.subject, this.predicate, this.object, this.graph);
1269
+ [Symbol.iterator]() {
1270
+ return this._filtered ? this._filtered[Symbol.iterator]() : this.n3Store.readQuads(this.subject, this.predicate, this.object, this.graph);
1272
1271
  }
1273
1272
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n3",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "description": "Lightning fast, asynchronous, streaming Turtle / N3 / RDF library.",
5
5
  "author": "Ruben Verborgh <ruben.verborgh@gmail.com>",
6
6
  "keywords": [
package/src/N3Store.js CHANGED
@@ -1148,10 +1148,9 @@ export default class N3Store {
1148
1148
  }
1149
1149
 
1150
1150
  // ### Store is an iterable.
1151
- // Can be used where iterables are expected: for...of loops, array spread operator,
1152
- // `yield*`, and destructuring assignment (order is not guaranteed).
1153
- *[Symbol.iterator]() {
1154
- yield* this.readQuads();
1151
+ // Returns the quad iterator directly; order is not guaranteed.
1152
+ [Symbol.iterator]() {
1153
+ return this.readQuads();
1155
1154
  }
1156
1155
  }
1157
1156
 
@@ -1345,7 +1344,8 @@ class DatasetCoreAndReadableStream extends Readable {
1345
1344
  return new DatasetCoreAndReadableStream(this.filtered, subject, predicate, object, graph, this.options);
1346
1345
  }
1347
1346
 
1348
- *[Symbol.iterator]() {
1349
- yield* this._filtered || this.n3Store.readQuads(this.subject, this.predicate, this.object, this.graph);
1347
+ [Symbol.iterator]() {
1348
+ return this._filtered ? this._filtered[Symbol.iterator]() :
1349
+ this.n3Store.readQuads(this.subject, this.predicate, this.object, this.graph);
1350
1350
  }
1351
1351
  }