npm.io
1.0.0 • Published 6 years ago

create-matrix

Licence
MIT
Version
1.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0
Stars
1

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.

Keywords