n3 2.5.0 → 2.6.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/README.md +11 -1
- package/browser/n3.esm.min.js +12 -12
- package/browser/n3.min.js +39 -1
- package/lib/N3Lexer.js +5 -5
- package/lib/N3Parser.js +4 -0
- package/package.json +9 -7
- package/src/N3Lexer.js +5 -5
- package/src/N3Parser.js +5 -0
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ or
|
|
|
45
45
|
[_Introduction to browserify_](https://writingjavascript.org/posts/introduction-to-browserify).
|
|
46
46
|
You will need to create a "UMD bundle" and supply a name (e.g. with the `-s N3` option in browserify).
|
|
47
47
|
|
|
48
|
-
You can also load it via CDN, either as a
|
|
48
|
+
You can also load it via CDN, either as a classic script that exposes a global `N3`:
|
|
49
49
|
```html
|
|
50
50
|
<script src="https://unpkg.com/n3/browser/n3.min.js"></script>
|
|
51
51
|
```
|
|
@@ -175,6 +175,16 @@ This is done by passing a `baseIRI` argument upon creation:
|
|
|
175
175
|
const parser = new N3.Parser({ baseIRI: 'http://example.org/' });
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
In N3 mode, `implicitEmptyPrefix` can bind an undeclared empty prefix to the
|
|
179
|
+
document IRI with a `#` fragment:
|
|
180
|
+
```JavaScript
|
|
181
|
+
const parser = new N3.Parser({
|
|
182
|
+
format: 'text/n3',
|
|
183
|
+
baseIRI: 'http://example.org/document',
|
|
184
|
+
implicitEmptyPrefix: true,
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
178
188
|
By default, `N3.Parser` will prefix blank node labels with a `b{digit}_` prefix.
|
|
179
189
|
This is done to prevent collisions of unrelated blank nodes having identical
|
|
180
190
|
labels. The `blankNodePrefix` constructor argument can be used to modify the
|