multi-matrix

1.0.1 • Public • Published

multi-matrix

Creates N dimensional matrix


Install

npm i -S multi-matrix
// yarn add multi-matrix

Usage

const { matrix } = require('multi-matrix')

matrix(2).forEach(([x]) => console.log(x));
matrix(2, 2).forEach(([x, y]) => console.log(x, y));
matrix(2, 2, 2).forEach(([x, y, z]) => console.log(x, y, z));
matrix(2, 2, 2, 2).forEach(([x, y, z, n]) => console.log(x, y, z, n));
matrix(2, 2, 2, 2, 2).forEach(([x, y, z, n1, n2]) => console.log(x, y, z, n1, n2));

matrix(2).map(([x]) => ({ x }));
matrix(2, 2).map(([x, y]) => ({ x, y }));
matrix(2, 2, 2).map(([x, y, z]) => ({ x, y, z }));
matrix(2, 2, 2, 2).map(([x, y, z, n]) => ({ x, y, z, n }));
matrix(2, 2, 2, 2, 2).map(([x, y, z, n1, n2]) => ({ x, y, z, n1, n2 }));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i multi-matrix

Weekly Downloads

4

Version

1.0.1

License

ISC

Unpacked Size

11.6 kB

Total Files

7

Last publish

Collaborators

  • filipemeneses