n3 1.20.2 → 1.20.3
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/N3Store.js +9 -3
- package/package.json +1 -1
- package/src/N3Store.js +3 -3
package/lib/N3Store.js
CHANGED
|
@@ -815,7 +815,9 @@ class N3Store {
|
|
|
815
815
|
* This method is aligned with Array.prototype.filter() in ECMAScript-262.
|
|
816
816
|
*/
|
|
817
817
|
filter(iteratee) {
|
|
818
|
-
const store = new N3Store(
|
|
818
|
+
const store = new N3Store({
|
|
819
|
+
entityIndex: this._entityIndex
|
|
820
|
+
});
|
|
819
821
|
for (const quad of this) if (iteratee(quad, this)) store.add(quad);
|
|
820
822
|
return store;
|
|
821
823
|
}
|
|
@@ -831,7 +833,9 @@ class N3Store {
|
|
|
831
833
|
* Returns a new dataset containing all quads returned by applying `iteratee` to each quad in the current dataset.
|
|
832
834
|
*/
|
|
833
835
|
map(iteratee) {
|
|
834
|
-
const store = new N3Store(
|
|
836
|
+
const store = new N3Store({
|
|
837
|
+
entityIndex: this._entityIndex
|
|
838
|
+
});
|
|
835
839
|
for (const quad of this) store.add(iteratee(quad, this));
|
|
836
840
|
return store;
|
|
837
841
|
}
|
|
@@ -891,7 +895,9 @@ class N3Store {
|
|
|
891
895
|
* Returns a new `Dataset` that is a concatenation of this dataset and the quads given as an argument.
|
|
892
896
|
*/
|
|
893
897
|
union(quads) {
|
|
894
|
-
const store = new N3Store(
|
|
898
|
+
const store = new N3Store({
|
|
899
|
+
entityIndex: this._entityIndex
|
|
900
|
+
});
|
|
895
901
|
store.addAll(this);
|
|
896
902
|
store.addAll(quads);
|
|
897
903
|
return store;
|
package/package.json
CHANGED
package/src/N3Store.js
CHANGED
|
@@ -866,7 +866,7 @@ export default class N3Store {
|
|
|
866
866
|
* This method is aligned with Array.prototype.filter() in ECMAScript-262.
|
|
867
867
|
*/
|
|
868
868
|
filter(iteratee) {
|
|
869
|
-
const store = new N3Store();
|
|
869
|
+
const store = new N3Store({ entityIndex: this._entityIndex });
|
|
870
870
|
for (const quad of this)
|
|
871
871
|
if (iteratee(quad, this))
|
|
872
872
|
store.add(quad);
|
|
@@ -884,7 +884,7 @@ export default class N3Store {
|
|
|
884
884
|
* Returns a new dataset containing all quads returned by applying `iteratee` to each quad in the current dataset.
|
|
885
885
|
*/
|
|
886
886
|
map(iteratee) {
|
|
887
|
-
const store = new N3Store();
|
|
887
|
+
const store = new N3Store({ entityIndex: this._entityIndex });
|
|
888
888
|
for (const quad of this)
|
|
889
889
|
store.add(iteratee(quad, this));
|
|
890
890
|
return store;
|
|
@@ -946,7 +946,7 @@ export default class N3Store {
|
|
|
946
946
|
* Returns a new `Dataset` that is a concatenation of this dataset and the quads given as an argument.
|
|
947
947
|
*/
|
|
948
948
|
union(quads) {
|
|
949
|
-
const store = new N3Store();
|
|
949
|
+
const store = new N3Store({ entityIndex: this._entityIndex });
|
|
950
950
|
store.addAll(this);
|
|
951
951
|
store.addAll(quads);
|
|
952
952
|
return store;
|