Skip to content

TidbitSoftware/is-2d-array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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