npm.io
1.1.1 • Published 7 years ago

is-2d-array

Licence
MIT
Version
1.1.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

is-2d-array Build Status

Check if array is 2D

Install

$ npm install --save is-2d-array

Usage

const is2dArray = require('is-2d-array');

is2dArray([['1', '2'], ['3', '4']]);
//=> true

is2dArray(['1', '2', '3', '4']);
//=> false

is2dArray([['1', '2'], '3', '4']);
//=> false

is2dArray([['1'], ['2'], ['3'], ['4']]);
//=> true

API

is2dArray(array)

Returns an boolean based on if it's a true 2D array or not.

License

MIT Lukasz Brodowski

Keywords