{"_id":"2dmatrix","_rev":"1-9070dc170bb127a7e9fa9e46459cc75b","name":"2dmatrix","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"2dmatrix","version":"1.0.0","keywords":["2d Matrix"],"author":{"name":"Hamza Atmaca"},"license":"MIT","_id":"2dmatrix@1.0.0","maintainers":[{"name":"attmacah","email":"hamzatmacatr@gmail.com"}],"dist":{"shasum":"0a6d35103a16446746161a2b0a73615d8d1aaec6","tarball":"https://registry.npmjs.org/2dmatrix/-/2dmatrix-1.0.0.tgz","fileCount":14,"integrity":"sha512-adDJ+l3Ro8L59/YpD+qfMHq5WjuLT/TyJxoNNTq9H2k4fUQPELnndnet0Vr1Y2p92nO/Vk/dX5jvLItKHE0FSQ==","signatures":[{"sig":"MEQCIHFnDTKqsT+gM0w34mA+FVQBj6kLU7IyFNLkExvgiwQuAiA1HQg9MbPNNf2egJCvdcCT89jTZau6V2LZOvUYudr7sw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9413},"main":"lib/index.js","type":"module","types":"dist/index.d.ts","scripts":{"build":"tsc -p .","start":"npx nodemon --ext ts --exec node --loader ts-node/esm src/index.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"attmacah","email":"hamzatmacatr@gmail.com"},"_npmVersion":"10.8.2","description":"A simple yet powerful TypeScript library for generating and displaying 2D matrices with CLI table formatting.","directories":{},"_nodeVersion":"18.20.6","dependencies":{"chalk":"^5.4.1","cli-table3":"^0.6.5"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.1.9","ts-node":"^10.9.2","typescript":"^5.7.3","@types/node":"^22.13.4"},"_npmOperationalInternal":{"tmp":"tmp/2dmatrix_1.0.0_1739794783904_0.047807801577357756","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"2dmatrix","version":"1.0.1","main":"lib/index.js","type":"module","types":"dist/index.d.ts","scripts":{"build":"tsc -p .","prepublishOnly":"npm run build","start":"npx nodemon --ext ts --exec node --loader ts-node/esm src/index.ts"},"keywords":["2d Matrix"],"author":{"name":"Hamza Atmaca"},"license":"MIT","description":"Create 2d Matrix","repository":{"type":"git","url":"https://codeberg.org/attmacah/2dMatrix.git"},"devDependencies":{"@types/node":"^22.13.4","nodemon":"^3.1.9","ts-node":"^10.9.2","typescript":"^5.7.3"},"dependencies":{"chalk":"^5.4.1","cli-table3":"^0.6.5"},"_id":"2dmatrix@1.0.1","gitHead":"e7a0b828a2cfd20e575f0c0f275fc3ec4794993d","_nodeVersion":"18.20.6","_npmVersion":"10.8.2","dist":{"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=="}]},"_npmUser":{"name":"attmacah","email":"hamzatmacatr@gmail.com"},"directories":{},"maintainers":[{"name":"attmacah","email":"hamzatmacatr@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/2dmatrix_1.0.1_1739795421106_0.624061331079869"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-17T12:19:43.835Z","modified":"2025-02-17T12:30:21.478Z","1.0.0":"2025-02-17T12:19:44.148Z","1.0.1":"2025-02-17T12:30:21.306Z"},"author":{"name":"Hamza Atmaca"},"license":"MIT","keywords":["2d Matrix"],"description":"Create 2d Matrix","maintainers":[{"name":"attmacah","email":"hamzatmacatr@gmail.com"}],"readme":"# 2DMatrix\r\n\r\nA simple yet powerful TypeScript library for generating and displaying 2D matrices with CLI table formatting.\r\n\r\n## Installation\r\n\r\n```sh\r\nnpm install 2dmatrix\r\n```\r\n\r\n## Features\r\n\r\n- Generate random 2D matrices with customizable dimensions and value ranges.\r\n- Display matrices in a well-formatted CLI table with coordinates.\r\n- Fully written in TypeScript with type definitions included.\r\n\r\n## Usage\r\n\r\n```ts\r\nimport mx from \"2dmatrix\";\r\n\r\nmx.openCLI = true; // Enable CLI table display\r\nmx.tableWidth = 20; // Set column width\r\n\r\nconst createRandomMatrix = mx.randomMx(2, 3, 50);\r\nconsole.log(createRandomMatrix);\r\n```\r\n\r\n### Output Example\r\n\r\n```\r\n╔══════╤══════╤══════╗\r\n║  12  │  34  │  23  ║\r\n║ (1,1)│ (1,2)│ (1,3)║\r\n╟──────┼──────┼──────╢\r\n║  45  │  32  │  11  ║\r\n║ (2,1)│ (2,2)│ (2,3)║\r\n╚══════╧══════╧══════╝\r\n```\r\n\r\n## API\r\n\r\n### `randomMx(rows: number, cols: number, range: number): RandomMx`\r\n\r\nGenerates a random matrix with given rows and columns, and fills it with random numbers up to the specified range.\r\n\r\n#### Parameters:\r\n\r\n- `rows` - Number of rows in the matrix.\r\n- `cols` - Number of columns in the matrix.\r\n- `range` - Maximum value for random numbers.\r\n\r\n#### Returns:\r\n\r\n```ts\r\n{\r\n  randomMatrix: number[][];\r\n  coordinates: Coordinate[];\r\n  matrixSize: string;\r\n}\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Author\r\n\r\nDeveloped by **Hamza Atmaca**.\r\n","readmeFilename":"Readme.md","repository":{"type":"git","url":"https://codeberg.org/attmacah/2dMatrix.git"}}