arraynd
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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]

Package Sidebar

Install

npm i arraynd

Weekly Downloads

3

Version

0.0.3

License

ISC

Unpacked Size

4.8 kB

Total Files

5

Last publish

Collaborators

  • timepp