arraynd

Lean, fixed multi-dimension array

Usage no npm install needed!

<script type="module">
  import arraynd from 'https://cdn.skypack.dev/arraynd';
</script>

README

ArrayN: Lean, fixed multi-dimension array

It's designed to easily creating/iterating multi-dimension arrays.

The usage is extremely straightforward:

    const x = new ArrayX([3, 4])
    x.set([2, 3], 10)
    console.log(x.get([2, 3])) // 10
    console.log(x.get([0, 0])) // undefined
    x.fill(([a, b]) => a * b)
    console.log(x.data) // [0,0,0,0,0,1,2,3,0,2,4,6]