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.
- package/browser/n3.min.js +1 -1
- package/lib/N3DataFactory.js +1 -1
- package/lib/N3Store.js +2 -2
- package/package.json +1 -1
- package/src/N3DataFactory.js +1 -1
- package/src/N3Store.js +3 -2
package/lib/N3DataFactory.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
|
311
|
+
return true;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
// ### `addQuads` adds multiple quads to the store
|
package/package.json
CHANGED
package/src/N3DataFactory.js
CHANGED
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
|
-
|
|
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
|
|
316
|
+
return true;
|
|
316
317
|
}
|
|
317
318
|
|
|
318
319
|
// ### `addQuads` adds multiple quads to the store
|