Skip to content

Instantly share code, notes, and snippets.

@keithwhor
Last active May 6, 2016 22:00
Show Gist options
  • Save keithwhor/6260d489b43048cc0ebf to your computer and use it in GitHub Desktop.
Save keithwhor/6260d489b43048cc0ebf to your computer and use it in GitHub Desktop.
Extended minecraft graph example
// Add even more nodes
let mojang = new Node('company', {name: 'Mojang'});
let microsoft = new Node('company', {name: 'Microsoft'});
let jennifer = new Node('person', {name: 'Jennifer'});
new Edge('founded').link(notch, mojang);
new Edge('acquired').link(microsoft, mojang);
new Edge('purchased').link(jennifer, minecraft);
new Edge('prints_money_for').link(minecraft, microsoft);
/*
Our new graph...
Jennifer
| (purchased)
v
Joe --(likes)--> Minecraft <--(created)-- Notch
(prints_money_for) | | (founded)
v v
Microsoft --(acquired)--> Mojang
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment