Skip to content

Commit 9fa26a2

Browse files
pheyvaerRubenVerborgh
authored andcommitted
Add documentation about base IRI of N3.Parser
1 parent c569689 commit 9fa26a2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ const parser4 = N3.Parser({ format: 'Notation3' });
106106
const parser5 = N3.Parser({ format: 'text/n3' });
107107
```
108108

109+
It is possible to provide the base IRI of the document that you want to parse.
110+
This is done by passing a `baseIRI` argument upon creation:
111+
```JavaScript
112+
const parser = new N3.Parser({ baseIRI: 'http://example.org/' });
113+
```
114+
109115
### From an RDF stream to quads
110116

111117
`N3.Parser` can parse [Node.js streams](http://nodejs.org/api/stream.html) as they grow,

0 commit comments

Comments
 (0)