Current collected state Current
Observed since 20 Oct, 19:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2dmatrix
Create 2d Matrix
A simple yet powerful TypeScript library for generating and displaying 2D matrices with CLI table formatting.
npm install 2dmatrix
import mx from "2dmatrix";
mx.openCLI = true; // Enable CLI table display
mx.tableWidth = 20; // Set column width
const createRandomMatrix = mx.randomMx(2, 3, 50);
console.log(createRandomMatrix);
╔══════╤══════╤══════╗
║ 12 │ 34 │ 23 ║
║ (1,1)│ (1,2)│ (1,3)║
╟──────┼──────┼──────╢
║ 45 │ 32 │ 11 ║
║ (2,1)│ (2,2)│ (2,3)║
╚══════╧══════╧══════╝
randomMx(rows: number, cols: number, range: number): RandomMxGenerates a random matrix with given rows and columns, and fills it with random numbers up to the specified range.
rows - Number of rows in the matrix.cols - Number of columns in the matrix.range - Maximum value for random numbers.{
randomMatrix: number[][];
coordinates: Coordinate[];
matrixSize: string;
}
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Hamza Atmaca.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
chalkEnvironment{
"local_name": "chalk",
"alias": false,
"peer_metadata": null
} | ^5.4.1 | runtime |
cli-table3Environment{
"local_name": "cli-table3",
"alias": false,
"peer_metadata": null
} | ^0.6.5 | runtime |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.13.4 | development |
nodemonEnvironment{
"local_name": "nodemon",
"alias": false,
"peer_metadata": null
} | ^3.1.9 | development |
ts-nodeEnvironment{
"local_name": "ts-node",
"alias": false,
"peer_metadata": null
} | ^10.9.2 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.7.3 | development |
Source distribution
{
"integrity": "sha512-LvQ4Ac00K1hI8nhRt5qLtIt+JAQLXnysHf8YqWeSVNX+JDRPbVjBPQfK+0dvmLs8Bo1ulkzANGIbNNhXoUqrTg==",
"shasum": "b4fa9f2890a7a373380bb40a0a268a13e2bbe43b",
"tarball": "https://registry.npmjs.org/2dmatrix/-/2dmatrix-1.0.1.tgz",
"fileCount": 14,
"unpackedSize": 9527,
"signatures": [
{
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
"sig": "MEQCIHHrCGxLzibYQk5XjMI2wqWLMeFTnAJLrm0WEItRBwqaAiBQ/7/T+M9urWKxFYvpZJ/hm261ymRcAEtDXjj/LZFyjw=="
}
]
}Observed since 20 Oct, 19:11 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:a304b78fc87e8bee9fbd0e445aaf26f3ccc6f35445de0a7a0c1db5e12b14b33f