-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
Add documentation about how to clone a DirectedGraph instance (because it's not necessarily obvious).
Currently, the best way is as follows:
const arccore = require("@encapsule/arccore");
var response = arccore.graph.directed.create({ name: "Source Graph" });
if (response.error) throw new Error(response.error);
var sourceDigraph = response.result;
// Clone sourceDigraph
response = arccore.graph.directed.create(sourceDigraph.toJSON());
if (response.error) throw new Error(response.error);
var clonedDigraph = response.result;