1.1.1 • Published 5 years ago

is-2d-array v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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