ixfx
    Preparing search index...
    • Makes a connection between options.a and one or more nodes in options.b. Same as connect but graph and edges are returned.

      let g = graph(); // Create an empty graph

      // Make a connection between `red` and `orange`
      result = connectWithEdges(g, { a: `red`, b: `orange` });

      // Make a connection between `red` and `orange as well as `red` and `yellow`.
      result = connectWithEdges(g, { a: `red`, b: [`orange`, `yellow`] })

      Parameters

      • graph: Readonly

        Initial graph

      • options: Readonly

        Options

      Returns {
          edges: Readonly<{ a: string; b: string; weight?: number }>[];
          graph: Readonly;
      }