//arrayToLowerCase.js
/*global adventurejs A*/
/**
* Takes an array of strings, converts them to lowercase, and returns the array.
* @method adventurejs#arrayToLowerCase
* @memberOf adventurejs
* @param {Array} array
* @returns {Array}
*/
adventurejs.arrayToLowerCase = function Adventurejs_arrayToLowerCase(array) {
if (!Array.isArray(array)) {
console.warn(
"arrayToLowerCase.js received something that's not an array. "
);
return false;
}
for (var item in array) {
if ("string" === typeof array[item]) {
array[item] = array[item].toLowerCase();
}
}
return array;
};