Function to remove spaces

/**
 * Function to remove spaces
 * @param inputString
 * @returns {*}
 */
function removeSpaces(inputString){
    try{
        let outputString =  inputString.replace(/  +/g, ' ');
        return outputString;
    }catch (e) {
        log.error({
            title: e.name,
            details: e
        });
    }
}

Leave a comment

Your email address will not be published. Required fields are marked *