get-depth

0.0.3 • Public • Published

get-depth

Get the Depth of a Multi-Dimensional Array

install

npm install get-depth

usage

const getDepth = require('get-depth');

const table = [
    [0, 1, 2, 3, 4, 5, 6, 7, 8 ], // first row
    [0, 1, 2, 3, 4, 5, 6, 7, 8 ] // second row
];

const depth = getDepth(table);
// depth is 2

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    3,649
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    3,649
  • 0.0.1
    0
  • 0.0.0
    43

Package Sidebar

Install

npm i get-depth

Weekly Downloads

3,692

Version

0.0.3

License

CC0-1.0

Unpacked Size

8.71 kB

Total Files

4

Last publish

Collaborators

  • danieljdufour