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

sparqljson-parse

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sparqljson-parse - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

CHANGELOG.md

4

lib/SparqlJsonParser.d.ts

@@ -19,2 +19,6 @@ /// <reference types="node" />

* Convert a SPARQL JSON bindings response stream to a stream of bindings objects.
*
* The bindings stream will emit a 'variables' event that will contain
* the array of variables (as RDF.Variable[]), as defined in the response head.
*
* @param {NodeJS.ReadableStream} sparqlResponseStream A SPARQL JSON response stream.

@@ -21,0 +25,0 @@ * @return {NodeJS.ReadableStream} A stream of bindings.

@@ -25,2 +25,6 @@ "use strict";

* Convert a SPARQL JSON bindings response stream to a stream of bindings objects.
*
* The bindings stream will emit a 'variables' event that will contain
* the array of variables (as RDF.Variable[]), as defined in the response head.
*
* @param {NodeJS.ReadableStream} sparqlResponseStream A SPARQL JSON response stream.

@@ -31,2 +35,7 @@ * @return {NodeJS.ReadableStream} A stream of bindings.

sparqlResponseStream.on('error', (error) => resultStream.emit('error', error));
const variables = [];
sparqlResponseStream
.pipe(require('JSONStream').parse('head.vars.*'))
.on('data', (variable) => variables.push(this.dataFactory.variable(variable)))
.on('end', () => resultStream.emit('variables', variables));
const resultStream = sparqlResponseStream

@@ -33,0 +42,0 @@ .pipe(require('JSONStream').parse('results.bindings.*'))

8

package.json
{
"name": "sparqljson-parse",
"version": "1.2.0",
"version": "1.3.0",
"description": "Parses SPARQL JSON query results",

@@ -42,2 +42,3 @@ "keywords": [

"jest": "^23.4.1",
"jest-rdf": "^1.1.0",
"pre-commit": "^1.2.2",

@@ -51,2 +52,3 @@ "streamify-string": "^1.0.1",

"jest": {
"setupTestFrameworkScriptFile": "jest-rdf",
"transform": {

@@ -76,5 +78,5 @@ "^.+\\.ts$": "ts-jest"

"dependencies": {
"JSONStream": "^1.3.3",
"@rdfjs/data-model": "^1.1.0"
"@rdfjs/data-model": "^1.1.0",
"JSONStream": "^1.3.3"
}
}
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