Gets the most specific common type of all the values in an array
TypeScript definitions included!
npm install array-typeof-values
var arrayTypeOfValues = require('array-typeof-values');
arrayTypeOfValues(['a', 'b', 'c']); // -> 'string'
arrayTypeOfValues(['a', 2, 'c']); // -> 'object'
arrayTypeOfValues([[1], ['b'], []]); // -> 'array'
arrayTypeOfValues([]); // -> undefined
MIT © https://github.com/DABH