// The whole-graph connected component containing the first element
ele.component(): Collection<NodeData, EdgeData>The whole-graph connected component containing the first element.
Returns
Collection<NodeData, EdgeData>the component as nodes and their connecting edges, computed over the whole graph rather than within this collection; an empty collection when this one is empty
Example
console.log(eles.component().map(ele => ele.id())); // ["a","b","c","ab","bc"]