0.0.3 • Published 3 years ago

get-depth v0.0.3

Weekly downloads
38
License
CC0-1.0
Repository
github
Last release
3 years ago

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