@on2ts/ontologies-sh
Advanced tools
Comparing version 1.0.14 to 1.0.16
@@ -6,2 +6,18 @@ # Change Log | ||
## 1.0.16 (2021-04-03) | ||
**Note:** Version bump only for package @on2ts/ontologies-sh | ||
## 1.0.15 (2021-04-03) | ||
**Note:** Version bump only for package @on2ts/ontologies-sh | ||
## [1.0.14](https://github.com/on2ts/ontologies/compare/v1.0.13...v1.0.14) (2021-03-30) | ||
@@ -8,0 +24,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { JsonLdParser } from 'jsonld-streaming-parser'; | ||
import { Quad } from 'rdf-js'; | ||
export declare function stream(): JsonLdParser; | ||
export declare function array(): Promise<Quad[]>; | ||
import type { JsonLdParser } from 'jsonld-streaming-parser'; | ||
import type { Quad } from 'rdf-js'; | ||
declare const stream: () => JsonLdParser, array: () => Promise<Quad[]>; | ||
export { stream, array }; |
@@ -7,28 +7,6 @@ "use strict"; | ||
exports.array = exports.stream = void 0; | ||
const jsonld_streaming_parser_1 = require("jsonld-streaming-parser"); | ||
const ontologies_utils_1 = require("@on2ts/ontologies-utils"); | ||
const ontology_json_1 = __importDefault(require("./ontology.json")); | ||
function stream() { | ||
const parserJsonld = new jsonld_streaming_parser_1.JsonLdParser(); | ||
parserJsonld.pause(); | ||
parserJsonld.write(JSON.stringify(ontology_json_1.default)); | ||
parserJsonld.end(); | ||
return parserJsonld; | ||
} | ||
const { stream, array } = ontologies_utils_1.exportsGenerator(ontology_json_1.default); | ||
exports.stream = stream; | ||
function array() { | ||
return new Promise((resolve, reject) => { | ||
const arr = []; | ||
const quadStream = stream(); | ||
quadStream.on('data', (data) => { | ||
arr.push(data); | ||
}); | ||
quadStream.on('end', () => { | ||
resolve(arr); | ||
}); | ||
quadStream.on('err', (e) => { | ||
reject(e); | ||
}); | ||
quadStream.resume(); | ||
}); | ||
} | ||
exports.array = array; |
{ | ||
"name": "@on2ts/ontologies-sh", | ||
"version": "1.0.14", | ||
"version": "1.0.16", | ||
"description": "SHACL ontology", | ||
@@ -34,11 +34,14 @@ "keywords": [ | ||
"dependencies": { | ||
"jsonld-streaming-parser": "^2.2.1" | ||
"@on2ts/ontologies-utils": "^1.0.16" | ||
}, | ||
"devDependencies": { | ||
"n3": "^1.8.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"gitHead": "c4b20d3ec41f397cfa29d6dbfb8947e024a22f44" | ||
"devDependencies": { | ||
"@types/n3": "^1.8.0", | ||
"@types/rdf-js": "^4.0.1", | ||
"jsonld-streaming-parser": "^2.2.1", | ||
"n3": "^1.9.0" | ||
}, | ||
"gitHead": "13f6450cc67f25e95470342e100a227c931177c8" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
133811
4
485
+ Added@on2ts/ontologies-utils@1.0.51(transitive)
+ Added@types/rdf-js@4.0.2(transitive)
+ Addedrdf-js@4.0.2(transitive)
- Removedjsonld-streaming-parser@^2.2.1