Catalog npm
PACKAGE EXPLORERView in registry

2d-arrays

npm

a node module which can get you 2d Array

2darrayarraylistmultidimensional
Versions collected1
Direct dependencies0From release 1.0.1
Last observed20 Oct, 19:09 UTC

README

Current package documentation

2d-Array

Create perfect 2d arrays in JavaScript without writing a custom js for it.

let dArray = require("2d-arrays");

let x = dArray(2, 2, true);
// [[0,0],
//  [0,1]]

dArray(arg1, arg2, arg3) arg1 represents the n number of rows and arg2 represents the m numbers of coloumns. arg3 is an optional arguments.

Cases for arg3

// Case I - To initilize every element to undefined (by default)
dArray(4, 2);

// Output
[
  [undefined, undefined],
  [undefined, undefined],
  [undefined, undefined],
  [undefined, undefined],
];
// Case I - To initialize with index position the index numbers
dArray(4, 2, true);

// Output
[
  ["0,0", "0,1"],
  ["1,0", "1,1"],
  ["2,0", "2,1"],
  ["3,0", "3,1"],
];
// To initilize every element to null
dArray(4, 2, true);

// Output
[
  [null, null],
  [null, null],
  [null, null],
  [null, null],
];

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.1Registry latest8 Feb 20220

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
akashprasher/2d-array

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:09 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c7dcf2381295eef474e2f08ee314332047c5842c917ac3a7fbc083db6b97b354