@rdfjs/parser-jsonld
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -0,3 +1,3 @@ | ||
const Sink = require('@rdfjs/sink') | ||
const ParserStream = require('./lib/ParserStream') | ||
const Sink = require('@rdfjs/sink') | ||
@@ -4,0 +4,0 @@ class Parser extends Sink { |
@@ -0,4 +1,4 @@ | ||
const rdf = require('@rdfjs/data-model') | ||
const concat = require('concat-stream') | ||
const jsonld = require('jsonld') | ||
const rdf = require('@rdfjs/data-model') | ||
const Readable = require('readable-stream') | ||
@@ -17,3 +17,3 @@ | ||
const concatStream = concat({ encoding: 'string' }, (data) => { | ||
const concatStream = concat({ encoding: 'string' }, data => { | ||
if (!data) { | ||
@@ -27,3 +27,3 @@ this.push(null) | ||
this.push(null) | ||
}).catch((err) => { | ||
}).catch(err => { | ||
this.emit('error', err) | ||
@@ -35,3 +35,3 @@ }) | ||
input.on('error', (err) => { | ||
input.on('error', err => { | ||
this.emit('error', err) | ||
@@ -62,6 +62,6 @@ }) | ||
parse (data) { | ||
return ParserStream.toPlainObject(data).then((object) => { | ||
return ParserStream.toPlainObject(data).then(object => { | ||
// forward context as prefixes if available | ||
if (typeof object['@context'] === 'object') { | ||
Object.keys(object['@context']).forEach((prefix) => { | ||
Object.keys(object['@context']).forEach(prefix => { | ||
this.emit('prefix', prefix, this.factory.namedNode(object['@context'][prefix])) | ||
@@ -68,0 +68,0 @@ }) |
{ | ||
"name": "@rdfjs/parser-jsonld", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "JSON-LD parser that implements the RDFJS Sink interface using jsonld.js", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "standard && mocha" | ||
"test": "stricter-standard && mocha" | ||
}, | ||
@@ -26,13 +26,13 @@ "repository": { | ||
"dependencies": { | ||
"@rdfjs/data-model": "^1.0.1", | ||
"@rdfjs/sink": "^1.0.2", | ||
"@rdfjs/data-model": "^1.3.4", | ||
"@rdfjs/sink": "^1.0.3", | ||
"concat-stream": "^2.0.0", | ||
"jsonld": "^1.8.1", | ||
"jsonld": "^5.2.0", | ||
"readable-stream": "^3.6.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^5.2.0", | ||
"standard": "^14.3.1", | ||
"mocha": "^9.1.3", | ||
"stricter-standard": "^0.2.0", | ||
"string-to-stream": "^3.0.1" | ||
} | ||
} |
const assert = require('assert') | ||
const sinkTest = require('@rdfjs/sink/test') | ||
const { describe, it } = require('mocha') | ||
const sinkTest = require('@rdfjs/sink/test') | ||
const Readable = require('readable-stream') | ||
const stringToStream = require('string-to-stream') | ||
const JSONLDParser = require('..') | ||
const Readable = require('readable-stream') | ||
@@ -28,3 +28,3 @@ function waitFor (stream) { | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -50,3 +50,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -72,3 +72,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -93,3 +93,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -113,3 +113,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -136,3 +136,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -157,3 +157,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -179,3 +179,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -201,3 +201,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -227,3 +227,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -253,3 +253,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -279,3 +279,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -299,3 +299,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -322,3 +322,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -344,3 +344,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -373,3 +373,3 @@ }) | ||
stream.on('data', (triple) => { | ||
stream.on('data', triple => { | ||
output.push(triple) | ||
@@ -376,0 +376,0 @@ }) |
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
19479
+ Added@digitalbazaar/http-client@1.2.0(transitive)
+ Addedabort-controller@3.0.0(transitive)
+ Addeddata-uri-to-buffer@3.0.1(transitive)
+ Addedesm@3.2.25(transitive)
+ Addedevent-target-shim@5.0.1(transitive)
+ Addedfetch-blob@2.1.2(transitive)
+ Addedjsonld@5.2.0(transitive)
+ Addedky@0.25.1(transitive)
+ Addedky-universal@0.8.2(transitive)
+ Addedlru-cache@6.0.0(transitive)
+ Addednode-fetch@3.0.0-beta.9(transitive)
+ Addedrdf-canonize@3.4.0(transitive)
+ Addedsetimmediate@1.0.5(transitive)
+ Addedyallist@4.0.0(transitive)
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsonld@1.8.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-forge@0.10.0(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrdf-canonize@1.2.0(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsemver@5.7.26.3.1(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedxmldom@0.1.19(transitive)
Updated@rdfjs/data-model@^1.3.4
Updated@rdfjs/sink@^1.0.3
Updatedjsonld@^5.2.0