Home
Softono

Cypher.js

Open source JavaScript
68
Stars
8
Forks
4
Issues
5
Watchers
1 year
Last Commit

 About Cypher.js

Cypher graph database for Javascript

Platforms

Web Self-hosted

Languages

JavaScript

Need Help Installing Cypher.js?

We provide expert installation service for this software. Our team will install, configure, and secure Cypher.js on your server. plans start at just $30.

Cypher.js

Cypher graph database query engine and graph database in Javascript. The Cypher query language in your browser! Zero dependencies

For inquiries, reach out to Cypher.js author Niclas Kjäll-Ohlsson ([email protected]).

Demos

  1. Just for fun: https://bit.ly/2Dbylrh
  2. Molecule interactions
  3. Game of Thrones: https://bit.ly/2QoBSG9
  4. Time series analysis: https://bit.ly/2zSQkzt
  5. Generate random strings: https://bit.ly/2FoJcAW
  6. Bill of material explosion: https://bit.ly/2DoKJE6
  7. Star Wars characters

Usage

Client-side (web browser)

  1. Include

    <script type="text/javascript" src="https://raw.githubusercontent.com/niclasko/Cypher.js/master/Cypher.min.js"></script>

  2. Use

    var cypher = new Cypher({runInWebWorker: true});
    
    var query = 'merge (n:Test{what:"Hello World"}) return n';
    
    cypher.execute(
    	query,
    	function(results) {
    		console.log(results);
    	},
    	function(errorText) {
    		console.log(errorText);
    	}
    );
    

Node.js

// Dependency to https package
var https = require("https");

var Cypher = require("Cypher.min.js").Cypher;

var options = {
	// In Node.js the runInWebWorker option must be set to false
	// Web Workers are not supported in Node.js
	runInWebWorker: false,
};
var cypher = new Cypher(options);

cypher.execute(
	'unwind range(0,10) as item return item',
	function(results) {
		console.log(JSON.stringify(results));
	},
	function(error) {
		console.log(error);
	}
);