src/Langs/MessageParser.js
/**
     * Parse the message by replacing the dynamic content.
     *
     * @param {String} message
     * @param {AxonLanguageResponse} args - Custom object with all arguments that needs to be inserted in the string
     * @returns {String} - The Parsed message
     * @memberof MessageParser
     */
Parse the message by replacing the dynamic content.
@param {String} message
@param {AxonLanguageResponse} args - Custom object with all arguments that needs to be inserted in the string
@returns {String} - The Parsed message
@memberof MessageParser
Parse the message by replacing the dynamic content . @param { String } message @param { AxonLanguageResponse } args - Custom object with all arguments that needs to be inserted in the string @returns { String } - The Parsed message @memberof MessageParser
parse(message, args) {
        let parsedMessage = message;
        for (const match of this.matchAll(message) ) {
            const toChange = args[match[1].trim()];
            if (toChange) {
                parsedMessage = parsedMessage.replace(match[0], toChange);
            }
        }
        return parsedMessage;
    }
parse ( message , args ) { let parsedMessage = message ; for ( const match of this . matchAll ( message ) ) { const toChange = args [ match [ 1 ] . trim ( ) ] ; if ( toChange ) { parsedMessage = parsedMessage . replace ( match [ 0 ] , toChange ) ; } } return parsedMessage ; }
Parse the message by replacing the dynamic content.
Parse the message by replacing the dynamic content .