# transpose-matrix

> Transpose a matrix

Latest version **1.2.0** (published 2017-09-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install transpose-matrix
pnpm add transpose-matrix
yarn add transpose-matrix
bun add transpose-matrix
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-09-11 |
| First published | 2017-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jay Hamilton |
| Maintainers | jaydaro |
| Keywords | transpose, array, rotate, matrix |

## Links

- npm: https://www.npmjs.com/package/transpose-matrix
- Repository: https://github.com/jaydaro/transpose-matrix
- Homepage: https://github.com/jaydaro/transpose-matrix#readme
- Issues: https://github.com/jaydaro/transpose-matrix/issues
- npm.io page: https://npm.io/package/transpose-matrix

## Recent versions

- 1.2.0 (latest) — 2017-09-11

## README

Transpose a matrix

Pass a matrix in and get a transposed matrix out

``````
const testMatrixSquare = [
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9],
  [1,2,3,4,5,6,7,8,9]
];

transposeMatrix(testMatrixSquare)';

``````
Will return 
````
    const expectedResults = [
      [1,1,1,1,1,1,1,1,1],
      [2,2,2,2,2,2,2,2,2],
      [3,3,3,3,3,3,3,3,3],
      [4,4,4,4,4,4,4,4,4],
      [5,5,5,5,5,5,5,5,5],
      [6,6,6,6,6,6,6,6,6],
      [7,7,7,7,7,7,7,7,7],
      [8,8,8,8,8,8,8,8,8],
      [9,9,9,9,9,9,9,9,9]
    ];
   
````
See the test cases for other usages.

---
_Source: https://npm.io/package/transpose-matrix · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
