@frogcat/ttl2jsonld 0.0.3 → 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/LICENSE +0 -0
- package/README.md +1 -1
- package/bin/cli.js +0 -0
- package/package.json +6 -8
- package/ttl2jsonld.js +8 -1
package/LICENSE
CHANGED
|
File without changes
|
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
|
|
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/bin/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frogcat/ttl2jsonld",
|
|
3
|
-
"version": "0.0.
|
|
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": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "mocha",
|
|
15
15
|
"build": "pegjs -o ttl2jsonld.js --format umd --export-var ttl2jsonld spec/ttl2jsonld.pegjs",
|
|
16
|
-
"spec-turtle": "rdf-test-suite spec/parser.js
|
|
16
|
+
"spec-turtle": "rdf-test-suite spec/parser.js https://w3c.github.io/rdf-tests/turtle/manifest.ttl -c .rdf-test-suite-cache/"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -32,12 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/frogcat/ttl2jsonld#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"mocha": "^6.0.2",
|
|
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.
|
|
41
|
-
"string-to-stream": "^1.1.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) {
|
|
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,
|