index.js
function isInList(value, listOfValues, msg) {
    value = value.toLowerCase().trim();
    if (listOfValues.indexOf(value) === -1) {
        throw new Error(msg);
    }
}
function isInList(value, listOfValues, msg) {
    value = value.toLowerCase().trim();
    if (listOfValues.indexOf(value) === -1) {
        throw new Error(msg);
    }
}
function isInList ( value , listOfValues , msg ) { value = value . toLowerCase ( ) . trim ( ) ; if ( listOfValues . indexOf ( value ) === - 1 ) { throw new Error ( msg ) ; } }
This method validates if the value exists in the list of values
@param value
@param listOfValues
@param msg is the error message that will be thrown when the value is not in the list
This method validates if the value exists in the list of values