n3 3.0.0-alpha.1 → 3.0.0-alpha.2

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/lib/N3Parser.js CHANGED
@@ -47,8 +47,8 @@ class N3Parser {
47
47
  // (enabled unless explicitly disabled)
48
48
  this._implicitEmptyPrefix = options.implicitEmptyPrefix !== false;
49
49
  // Whether an empty formula is read as the boolean literal true,
50
- // as in the N3 spec tests (opt-in until the next major version)
51
- this._emptyFormulaAsTrue = !!options.emptyFormulaAsTrue;
50
+ // as in the N3 spec tests (enabled unless explicitly disabled)
51
+ this._emptyFormulaAsTrue = options.emptyFormulaAsTrue !== false;
52
52
  // Disable relative IRIs in N-Triples or N-Quads mode
53
53
  if (isLineMode) this._resolveRelativeIRI = iri => {
54
54
  return null;
@@ -873,7 +873,7 @@ class N3Parser {
873
873
  // Restore the parent context containing this formula
874
874
  this._restoreContext('formula', token);
875
875
 
876
- // When the emptyFormulaAsTrue option is set, an empty formula
876
+ // Unless the emptyFormulaAsTrue option is false, an empty formula
877
877
  // is read as the boolean literal true, following the N3 spec tests
878
878
  // and the direction discussed in https://github.com/w3c-cg/N3/issues/185
879
879
  if (empty && this._emptyFormulaAsTrue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n3",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.2",
4
4
  "description": "Lightning fast, asynchronous, streaming Turtle / N3 / RDF library.",
5
5
  "author": "Ruben Verborgh <ruben.verborgh@gmail.com>",
6
6
  "keywords": [
package/src/N3Parser.js CHANGED
@@ -40,8 +40,8 @@ export default class N3Parser {
40
40
  // (enabled unless explicitly disabled)
41
41
  this._implicitEmptyPrefix = options.implicitEmptyPrefix !== false;
42
42
  // Whether an empty formula is read as the boolean literal true,
43
- // as in the N3 spec tests (opt-in until the next major version)
44
- this._emptyFormulaAsTrue = !!options.emptyFormulaAsTrue;
43
+ // as in the N3 spec tests (enabled unless explicitly disabled)
44
+ this._emptyFormulaAsTrue = options.emptyFormulaAsTrue !== false;
45
45
  // Disable relative IRIs in N-Triples or N-Quads mode
46
46
  if (isLineMode)
47
47
  this._resolveRelativeIRI = iri => { return null; };
@@ -942,7 +942,7 @@ export default class N3Parser {
942
942
  // Restore the parent context containing this formula
943
943
  this._restoreContext('formula', token);
944
944
 
945
- // When the emptyFormulaAsTrue option is set, an empty formula
945
+ // Unless the emptyFormulaAsTrue option is false, an empty formula
946
946
  // is read as the boolean literal true, following the N3 spec tests
947
947
  // and the direction discussed in https://github.com/w3c-cg/N3/issues/185
948
948
  if (empty && this._emptyFormulaAsTrue) {