src/network/error-parsing.js
function _formatParameters(parameters) {
    let options = {},
        formatter, value;
    for (let prop in parameters) {
        if (parameters.hasOwnProperty(prop)) {
            if (parameters[prop].domain) {
                let domain = getDomains()[parameters[prop].domain];
                formatter = domain ? domain.format : undefined;
            } else {
                formatter = undefined;
            }
            value = formatter && formatter.value ? formatter.value(parameters[prop].value) : parameters[prop].value;
            options[prop] = value;
        }
    }
    return options;
}
function _formatParameters(parameters) {
    let options = {},
        formatter, value;
    for (let prop in parameters) {
        if (parameters.hasOwnProperty(prop)) {
            if (parameters[prop].domain) {
                let domain = getDomains()[parameters[prop].domain];
                formatter = domain ? domain.format : undefined;
            } else {
                formatter = undefined;
            }
            value = formatter && formatter.value ? formatter.value(parameters[prop].value) : parameters[prop].value;
            options[prop] = value;
        }
    }
    return options;
}
function _formatParameters ( parameters ) { let options = { } , formatter , value ; for ( let prop in parameters ) { if ( parameters . hasOwnProperty ( prop ) ) { if ( parameters [ prop ] . domain ) { let domain = getDomains ( ) [ parameters [ prop ] . domain ] ; formatter = domain ? domain . format : undefined ; } else { formatter = undefined ; } value = formatter && formatter . value ? formatter . value ( parameters [ prop ] . value ) : parameters [ prop ] . value ; options [ prop ] = value ; } } return options ; }
Template an error message with parameters.
@param  {object} parameters - The parameters to format.
@return {object}            - The formated parameters.
Template an error message with parameters .