n3 2.2.12 → 2.2.14
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 +9 -0
- package/browser/n3.esm.min.js +6 -6
- package/browser/n3.min.js +1 -1
- package/lib/N3Parser.js +66 -21
- package/package.json +1 -1
- package/src/N3Parser.js +60 -22
package/README.md
CHANGED
|
@@ -180,6 +180,15 @@ The parser can output a backwards chaining rule such as `_:q <= _:p.` in two way
|
|
|
180
180
|
const parser = new N3.Parser({ isImpliedBy: true });
|
|
181
181
|
```
|
|
182
182
|
|
|
183
|
+
By default, an empty formula `{}` is kept as a blank node graph term.
|
|
184
|
+
The [N3 spec tests](https://w3c-cg.github.io/N3/tests/)
|
|
185
|
+
(and the direction discussed in [w3c-cg/N3#185](https://github.com/w3c-cg/N3/issues/185))
|
|
186
|
+
read it as the boolean literal `"true"^^xsd:boolean` instead;
|
|
187
|
+
the `emptyFormulaAsTrue` flag enables that behavior:
|
|
188
|
+
```JavaScript
|
|
189
|
+
const parser = new N3.Parser({ format: 'text/n3', emptyFormulaAsTrue: true });
|
|
190
|
+
```
|
|
191
|
+
|
|
183
192
|
### From an RDF stream to quads
|
|
184
193
|
|
|
185
194
|
`N3.Parser` can parse [Node.js streams](http://nodejs.org/api/stream.html) as they grow,
|