1.0.0 • Published 4 years ago

create-matrix v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

create-matrix Travis CI Build Status

Create an array matrix.

NPM Badge

Install

npm install create-matrix

Usage

const createMatrix = require("create-matrix");

createMatrix(2, 3, 0);
/*[
	[0, 0, 0],
	[0, 0, 0]
]*/

API

createMatrix(rows, columns, value?)

rows

Type: positive integer

The rows to create.

columns

Type: positive integer

The columns to create.

value

Type: any\ Default: empty

The default value to insert.