odoo-13.0/addons/web/static/src/js/fields/field_utils.js
/**
 * Returns a string representing a char.  If the value is false, then we return
 * an empty string.
 *
 * @param {string|false} value
 * @param {Object} [field]
 *        a description of the field (note: this parameter is ignored)
 * @param {Object} [options] additional options
 * @param {boolean} [options.escape=false] if true, escapes the formatted value
 * @param {boolean} [options.isPassword=false] if true, returns '********'
 *   instead of the formatted value
 * @returns {string}
 */
Returns a string representing a char.  If the value is false, then we return
an empty string.


Returns a string representing a char . If the value is false then we return an empty string .
function formatChar(value, field, options) {
    value = typeof value === 'string' ? value : '';
    if (options && options.isPassword) {
        return _.str.repeat('*', value ? value.length : 0);
    }
    if (options && options.escape) {
        value = _.escape(value);
    }
    return value;
}
function formatChar ( value , field , options ) { value = typeof value === 'string' ? value : '' ; if ( options && options . isPassword ) { return _ . str . repeat ( '*' , value ? value . length : 0 ) ; } if ( options && options . escape ) { value = _ . escape ( value ) ; } return value ; }
Returns a string representing a char.
Returns a string representing a char .