jstrip
Version:
webpage crawler manipulation
15 lines (13 loc) • 300 B
JavaScript
/**
* Check input if it is an Array.
*
* @param {*} value to check.
* @returns boolean true if an array or false if not an array
*/
const isArray = (data) => {
if (data && typeof data === 'object') {
if (Array.isArray(data)) return true;
}
return false;
};
module.exports = isArray;