hd-utils
Version:
A handy utils for modern JS developers
8 lines (7 loc) • 303 B
JavaScript
/**
* @description It returns true if the value is an array of strings, otherwise it returns false
* @returns A function that takes a value and returns a boolean.
*/
export default function isArrayOfStrings(value) {
return Array.isArray(value) && value.every(item => typeof item === 'string');
}