n3 2.13.7 → 2.13.9
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 -0
- package/browser/n3.esm.min.js +2 -2
- package/browser/n3.min.js +2 -2
- package/lib/N3DataFactory.js +3 -2
- package/lib/N3Store.js +2 -1
- package/package.json +2 -2
- package/src/N3DataFactory.js +3 -2
- package/src/N3Store.js +5 -1
package/lib/N3DataFactory.js
CHANGED
|
@@ -53,8 +53,9 @@ class Term {
|
|
|
53
53
|
// ### Returns whether this object represents the same term as the other
|
|
54
54
|
equals(other) {
|
|
55
55
|
// If both terms were created by this library,
|
|
56
|
-
// equality can be computed through ids
|
|
57
|
-
|
|
56
|
+
// equality can be computed through ids of the same term type,
|
|
57
|
+
// since IRIs such as `?x` have the same id as other terms
|
|
58
|
+
if (other instanceof Term) return this.id === other.id && this.termType === other.termType;
|
|
58
59
|
// Otherwise, compare term type and value
|
|
59
60
|
return !!other && this.termType === other.termType && this.value === other.value;
|
|
60
61
|
}
|
package/lib/N3Store.js
CHANGED
|
@@ -528,7 +528,8 @@ class N3Store {
|
|
|
528
528
|
|
|
529
529
|
// ### `has` determines whether a dataset includes a certain quad or quad pattern.
|
|
530
530
|
has(subjectOrQuad, predicate, object, graph) {
|
|
531
|
-
|
|
531
|
+
// A quad with no other bound terms is the whole quad; otherwise it is a quoted subject
|
|
532
|
+
if (subjectOrQuad && subjectOrQuad.subject && (predicate === undefined || predicate === null) && (object === undefined || object === null) && (graph === undefined || graph === null)) ({
|
|
532
533
|
subject: subjectOrQuad,
|
|
533
534
|
predicate,
|
|
534
535
|
object,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n3",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.9",
|
|
4
4
|
"description": "Lightning fast, asynchronous, streaming Turtle / N3 / RDF library.",
|
|
5
5
|
"author": "Ruben Verborgh <ruben.verborgh@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
[
|
|
135
135
|
"@semantic-release/github",
|
|
136
136
|
{
|
|
137
|
-
"successCommentCondition": "<% return !branch.prerelease; %>"
|
|
137
|
+
"successCommentCondition": "<% return !branch.prerelease && !(issue.labels || []).some(function (label) { return /^released( on @|$)/.test(label.name); }) %>"
|
|
138
138
|
}
|
|
139
139
|
]
|
|
140
140
|
]
|
package/src/N3DataFactory.js
CHANGED
|
@@ -41,9 +41,10 @@ export class Term {
|
|
|
41
41
|
// ### Returns whether this object represents the same term as the other
|
|
42
42
|
equals(other) {
|
|
43
43
|
// If both terms were created by this library,
|
|
44
|
-
// equality can be computed through ids
|
|
44
|
+
// equality can be computed through ids of the same term type,
|
|
45
|
+
// since IRIs such as `?x` have the same id as other terms
|
|
45
46
|
if (other instanceof Term)
|
|
46
|
-
return this.id === other.id;
|
|
47
|
+
return this.id === other.id && this.termType === other.termType;
|
|
47
48
|
// Otherwise, compare term type and value
|
|
48
49
|
return !!other && this.termType === other.termType &&
|
|
49
50
|
this.value === other.value;
|
package/src/N3Store.js
CHANGED
|
@@ -548,7 +548,11 @@ export default class N3Store {
|
|
|
548
548
|
|
|
549
549
|
// ### `has` determines whether a dataset includes a certain quad or quad pattern.
|
|
550
550
|
has(subjectOrQuad, predicate, object, graph) {
|
|
551
|
-
|
|
551
|
+
// A quad with no other bound terms is the whole quad; otherwise it is a quoted subject
|
|
552
|
+
if (subjectOrQuad && subjectOrQuad.subject &&
|
|
553
|
+
(predicate === undefined || predicate === null) &&
|
|
554
|
+
(object === undefined || object === null) &&
|
|
555
|
+
(graph === undefined || graph === null))
|
|
552
556
|
({ subject: subjectOrQuad, predicate, object, graph } = subjectOrQuad);
|
|
553
557
|
// Fully bound quads can bypass the generator machinery of `readQuads`.
|
|
554
558
|
if (subjectOrQuad && predicate && object && graph !== undefined && graph !== null) {
|