Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rdfjs/parser-jsonld

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rdfjs/parser-jsonld - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

.github/workflows/ci.yaml

2

index.js

@@ -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 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc