@frogcat/ttl2jsonld 0.0.6 → 0.0.7

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
@@ -130,6 +130,6 @@ var json_object = ttl2jsonld.parse(turtle_string, {
130
130
  ### testing
131
131
 
132
132
  - Tested with [rdf-test-suite](https://www.npmjs.com/package/rdf-test-suite).
133
- - Currently 291 / 298 tests succeeded.
133
+ - Currently 294 / 298 tests succeeded.
134
134
  - Run `npm run spec-turtle` to start rdr-test-suite.
135
135
  - Other miscellaneous tests are located in `test/test.js`, `npm run test` to run.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frogcat/ttl2jsonld",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Turtle to JSON-LD converter for node.js and browser, no library dependencies",
5
5
  "main": "ttl2jsonld.js",
6
6
  "files": [
@@ -32,12 +32,10 @@
32
32
  },
33
33
  "homepage": "https://github.com/frogcat/ttl2jsonld#readme",
34
34
  "devDependencies": {
35
- "@rdfjs/data-model": "^1.1.2",
36
- "@rdfjs/parser-jsonld": "^1.2.0",
37
- "chai": "^4.2.0",
38
- "mocha": "^7.2.0",
35
+ "chai": "^4.3.6",
36
+ "jsonld-streaming-parser": "^2.4.2",
37
+ "mocha": "^9.2.0",
39
38
  "pegjs": "^0.10.0",
40
- "rdf-test-suite": "^1.13.0",
41
- "string-to-stream": "^3.0.1"
39
+ "rdf-test-suite": "^1.18.0"
42
40
  }
43
41
  }
package/ttl2jsonld.js CHANGED
@@ -352,7 +352,14 @@
352
352
  peg$c98 = function(a, b) {return a.join("")+b.join("");},
353
353
  peg$c99 = /^[+\-]/,
354
354
  peg$c100 = peg$classExpectation(["+", "-"], false, false),
355
- peg$c101 = function(a) { return parseInt(a);},
355
+ peg$c101 = function(a) {
356
+ if(a.match(/^[0+][0-9]+$/))
357
+ return {
358
+ "@value" : a,
359
+ "@type" : "http://www.w3.org/2001/XMLSchema#integer"
360
+ };
361
+ return parseInt(a);
362
+ },
356
363
  peg$c102 = function(a) {
357
364
  return {
358
365
  "@value" : a,