n3 2.2.13 → 2.2.15

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 CHANGED
@@ -284,6 +284,12 @@ const writer1 = new N3.Writer({ format: 'N-Triples' });
284
284
  const writer2 = new N3.Writer({ format: 'application/trig' });
285
285
  ```
286
286
 
287
+ A `baseIRI` argument makes the writer abbreviate IRIs relative to that base in Turtle/TriG serializations. Pass `writeBase: true` to also write the base as an `@base` directive at the top of the document (N-Triples and N-Quads remain directive-free).
288
+
289
+ ```JavaScript
290
+ const writer = new N3.Writer({ baseIRI: 'http://example.org/', writeBase: true });
291
+ ```
292
+
287
293
  ### From quads to an RDF stream
288
294
 
289
295
  `N3.Writer` can also write quads to a Node.js stream through `addQuad`.