Skip to content

DanielJDufour/get-depth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Get the Depth of a Multi-Dimensional Array of Values

Resources

License

Stars

Watchers

Forks

Packages

No packages published