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

co-cypher

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-cypher

co interface for node-cypher

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

co-cypher Build Status

... is a wrapper around node-cypher which provides thunks in order to use with co.

Installation

Remember you need node v0.11 or newer and use the --harmony flag in order to get support for generators.

npm install co-cypher

Usage

var co = require("co"),
    cypher = require("../");

co(function*() {
  
  var client = yield cypher.createClient("http://localhost:7474");
  var result = yield client.query("RETURN 42 AS solution");
  console.log("The solution is %s", results.data[0][0]);
  
})();

cypher.createClient and client.query use the exact same arguments as they do in node-cypher. In addition a client has queryAsnc which is a copy of the original query. Use it if you want to mix callbacks and generators (it's also used internally).

Tests

You'll need a neo4j server running on localhost:7474 to pass all tests

npm test
# - or -
node --harmony test/test.js

License

MIT

Keywords

FAQs

Package last updated on 15 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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