n3 1.20.0 → 1.20.1

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.
@@ -11,7 +11,7 @@ exports.unescapeQuotes = unescapeQuotes;
11
11
  var _IRIs = _interopRequireDefault(require("./IRIs"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  // N3.js implementations of the RDF/JS core data types
14
- // See https://github.com/rdfjs/representation-task-force/blob/master/interface-spec.md
14
+ // See http://rdf.js.org/data-model-spec/
15
15
 
16
16
  const {
17
17
  rdf,
package/lib/N3Store.js CHANGED
@@ -302,13 +302,13 @@ class N3Store {
302
302
  subject = this._termToNewNumericId(subject);
303
303
  predicate = this._termToNewNumericId(predicate);
304
304
  object = this._termToNewNumericId(object);
305
- const changed = this._addToIndex(graphItem.subjects, subject, predicate, object);
305
+ if (!this._addToIndex(graphItem.subjects, subject, predicate, object)) return false;
306
306
  this._addToIndex(graphItem.predicates, predicate, object, subject);
307
307
  this._addToIndex(graphItem.objects, object, subject, predicate);
308
308
 
309
309
  // The cached quad count is now invalid
310
310
  this._size = null;
311
- return changed;
311
+ return true;
312
312
  }
313
313
 
314
314
  // ### `addQuads` adds multiple quads to the store
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n3",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
4
4
  "description": "Lightning fast, asynchronous, streaming Turtle / N3 / RDF library.",
5
5
  "author": "Ruben Verborgh <ruben.verborgh@gmail.com>",
6
6
  "keywords": [
@@ -1,5 +1,5 @@
1
1
  // N3.js implementations of the RDF/JS core data types
2
- // See https://github.com/rdfjs/representation-task-force/blob/master/interface-spec.md
2
+ // See http://rdf.js.org/data-model-spec/
3
3
 
4
4
  import namespaces from './IRIs';
5
5
 
package/src/N3Store.js CHANGED
@@ -306,13 +306,14 @@ export default class N3Store {
306
306
  predicate = this._termToNewNumericId(predicate);
307
307
  object = this._termToNewNumericId(object);
308
308
 
309
- const changed = this._addToIndex(graphItem.subjects, subject, predicate, object);
309
+ if (!this._addToIndex(graphItem.subjects, subject, predicate, object))
310
+ return false;
310
311
  this._addToIndex(graphItem.predicates, predicate, object, subject);
311
312
  this._addToIndex(graphItem.objects, object, subject, predicate);
312
313
 
313
314
  // The cached quad count is now invalid
314
315
  this._size = null;
315
- return changed;
316
+ return true;
316
317
  }
317
318
 
318
319
  // ### `addQuads` adds multiple quads to the store