Skip to content

grafikri/transpose-2D-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You can use this method to transpose 2D array.

Build Status install size

Install

$ npm i transpose-2d-array

Usage

import transpose from "transpose-2d-array"

or

const transpose = require("transpose-2d-array")
const arr = [
  [[1], [2]],
  [[1], [2]],
  [[1], [2]],
  [[1], [2]]
]

const result = transpose(arr)

// result will be
//
// [
//   [[1], [1], [1], [1]],
//   [[2], [2], [2], [2]]
// ]

About

This method can use to transpose 2D array.

Resources

Stars

Watchers

Forks

Packages

No packages published