Makes a connection between options.a and one or more nodes in options.b. Same as connectWithEdges but only the Graph is returned.
options.a
options.b
let g = graph(); // Create an empty graph// Make a connection between `red` and `orange`g = connect(g, { a: `red`, b: `orange` });// Make a connection between `red` and `orange as well as `red` and `yellow`.g = connect(g, { a: `red`, b: [`orange`, `yellow`] }) Copy
let g = graph(); // Create an empty graph// Make a connection between `red` and `orange`g = connect(g, { a: `red`, b: `orange` });// Make a connection between `red` and `orange as well as `red` and `yellow`.g = connect(g, { a: `red`, b: [`orange`, `yellow`] })
Initial graph
Options
Makes a connection between
options.a
and one or more nodes inoptions.b
. Same as connectWithEdges but only the Graph is returned.