n3 1.24.0 → 1.24.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/N3Store.js +2 -2
- package/package.json +1 -1
- package/src/N3Store.js +2 -2
package/lib/N3Store.js
CHANGED
|
@@ -147,7 +147,7 @@ class N3Store {
|
|
|
147
147
|
this._graphs = Object.create(null);
|
|
148
148
|
|
|
149
149
|
// Shift parameters if `quads` is not given
|
|
150
|
-
if (!options && quads && !quads[0]) options = quads, quads = null;
|
|
150
|
+
if (!options && quads && !quads[0] && !(typeof quads.match === 'function')) options = quads, quads = null;
|
|
151
151
|
options = options || {};
|
|
152
152
|
this._factory = options.factory || _N3DataFactory.default;
|
|
153
153
|
this._entityIndex = options.entityIndex || new N3EntityIndex({
|
|
@@ -159,7 +159,7 @@ class N3Store {
|
|
|
159
159
|
this._termToNewNumericId = this._entityIndex._termToNewNumericId.bind(this._entityIndex);
|
|
160
160
|
|
|
161
161
|
// Add quads if passed
|
|
162
|
-
if (quads) this.
|
|
162
|
+
if (quads) this.addAll(quads);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
// ## Public properties
|
package/package.json
CHANGED
package/src/N3Store.js
CHANGED
|
@@ -163,7 +163,7 @@ export default class N3Store {
|
|
|
163
163
|
this._graphs = Object.create(null);
|
|
164
164
|
|
|
165
165
|
// Shift parameters if `quads` is not given
|
|
166
|
-
if (!options && quads && !quads[0])
|
|
166
|
+
if (!options && quads && !quads[0] && !(typeof quads.match === 'function'))
|
|
167
167
|
options = quads, quads = null;
|
|
168
168
|
options = options || {};
|
|
169
169
|
this._factory = options.factory || N3DataFactory;
|
|
@@ -175,7 +175,7 @@ export default class N3Store {
|
|
|
175
175
|
|
|
176
176
|
// Add quads if passed
|
|
177
177
|
if (quads)
|
|
178
|
-
this.
|
|
178
|
+
this.addAll(quads);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
// ## Public properties
|