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

cypher-stream

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypher-stream - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

8

index.js

@@ -7,2 +7,6 @@ var oboe = require('oboe');

function extractData(item) {
return item.data;
}
function CypherStream (url, query, params) {

@@ -26,2 +30,6 @@ Readable.call(this, { objectMode: true });

columns.forEach(function (column, i) {
if(result[i].length && result[i][0].data) {
data[column] = result[i].map(extractData);
return;
}
data[column] = result[i].data || result[i];

@@ -28,0 +36,0 @@ });

2

package.json
{
"name": "cypher-stream",
"version": "0.1.5",
"version": "0.1.6",
"description": "Streams cypher query results in a clean format",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -71,3 +71,21 @@ var should = require('should');

it('returns non-node results', function (done) {
it('returns non-object values', function (done) {
cypher('match (n:Test) return n.test as test limit 1')
.on('data', function (result) {
result.test.should.be.true;
})
.on('end', done)
;
});
it('returns collections', function (done) {
cypher('match (n:Test) return collect(n) as nodes limit 1')
.on('data', function (result) {
result.nodes[0].test.should.be.true;
})
.on('end', done)
;
});
it('returns non-node collections', function (done) {
cypher('match (n:Test) return labels(n) as labels limit 1')

@@ -77,7 +95,6 @@ .on('data', function (result) {

})
.on('end', function () {
done();
});
.on('end', done)
;
});
});
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