ixfx
    Preparing search index...
    • Wraps array for grid access. Immutable, such that underlying array is not modified and a call to set returns a new GridArray1d.

      const myArray = [
      `a`, `b`, `c`,
      `d`, `e`, `f`
      ];
      let g = wrap(myArray, {rows: 2, cols:3});
      g.get({ x:1, y:2 }); // Get value at cell position

      // Note that `set` returns a new instance
      g = g.set(10, { x:1, y:2 }); // Set value at cell position
      g.array; // Get reference to current array

      Use wrapMutable to modify an array in-place

      Type Parameters

      • T

      Parameters

      Returns GridArray1d<T>