src/sap.ui.core/src/sap/ui/model/odata/type/UnitMixin.js
function formatValue(aValues, sTargetType) {
			var oFormatOptions,
				that = this;

			if (this.mCustomUnits === undefined && aValues && aValues[2] !== undefined) {
				if (aValues[2] === null) { // no unit customizing available
					this.mCustomUnits = null;
				} else {
					this.mCustomUnits = mCodeList2CustomUnits.get(aValues[2]);
					if (!this.mCustomUnits) {
						this.mCustomUnits = {};
						Object.keys(aValues[2]).forEach(function (sKey) {
							that.mCustomUnits[sKey] = that.getCustomUnitForKey(aValues[2], sKey);
						});
						mCodeList2CustomUnits.set(aValues[2], this.mCustomUnits);
					}
					oFormatOptions = {};
					oFormatOptions[sFormatOptionName] = this.mCustomUnits;
					fnBaseType.prototype.setFormatOptions.call(this,
						Object.assign(oFormatOptions, this.oFormatOptions));
				}
			}

			// composite binding calls formatValue several times,
			// where some parts are not yet available
			if (!aValues || aValues[0] === undefined || aValues[1] === undefined
				|| this.mCustomUnits === undefined && aValues[2] === undefined) {
				return null;
			}

			return fnBaseType.prototype.formatValue.call(this, aValues.slice(0, 2), sTargetType);
		}
function formatValue(aValues, sTargetType) {
			var oFormatOptions,
				that = this;

			if (this.mCustomUnits === undefined && aValues && aValues[2] !== undefined) {
				if (aValues[2] === null) { // no unit customizing available
					this.mCustomUnits = null;
				} else {
					this.mCustomUnits = mCodeList2CustomUnits.get(aValues[2]);
					if (!this.mCustomUnits) {
						this.mCustomUnits = {};
						Object.keys(aValues[2]).forEach(function (sKey) {
							that.mCustomUnits[sKey] = that.getCustomUnitForKey(aValues[2], sKey);
						});
						mCodeList2CustomUnits.set(aValues[2], this.mCustomUnits);
					}
					oFormatOptions = {};
					oFormatOptions[sFormatOptionName] = this.mCustomUnits;
					fnBaseType.prototype.setFormatOptions.call(this,
						Object.assign(oFormatOptions, this.oFormatOptions));
				}
			}

			// composite binding calls formatValue several times,
			// where some parts are not yet available
			if (!aValues || aValues[0] === undefined || aValues[1] === undefined
				|| this.mCustomUnits === undefined && aValues[2] === undefined) {
				return null;
			}

			return fnBaseType.prototype.formatValue.call(this, aValues.slice(0, 2), sTargetType);
		}
function formatValue ( aValues , sTargetType ) { var oFormatOptions , that = this ; if ( this . mCustomUnits === undefined && aValues && aValues [ 2 ] !== undefined ) { if ( aValues [ 2 ] === null ) { // no unit customizing available this . mCustomUnits = null ; } else { this . mCustomUnits = mCodeList2CustomUnits . get ( aValues [ 2 ] ) ; if ( ! this . mCustomUnits ) { this . mCustomUnits = { } ; Object . keys ( aValues [ 2 ] ) . forEach ( function ( sKey ) { that . mCustomUnits [ sKey ] = that . getCustomUnitForKey ( aValues [ 2 ] , sKey ) ; } ) ; mCodeList2CustomUnits . set ( aValues [ 2 ] , this . mCustomUnits ) ; } oFormatOptions = { } ; oFormatOptions [ sFormatOptionName ] = this . mCustomUnits ; fnBaseType . prototype . setFormatOptions . call ( this , Object . assign ( oFormatOptions , this . oFormatOptions ) ) ; } } // composite binding calls formatValue several times, // where some parts are not yet available if ( ! aValues || aValues [ 0 ] === undefined || aValues [ 1 ] === undefined || this . mCustomUnits === undefined && aValues [ 2 ] === undefined ) { return null ; } return fnBaseType . prototype . formatValue . call ( this , aValues . slice ( 0 , 2 ) , sTargetType ) ; }
Formats the given values of the parts of the composite type to the given target type.

@param {any[]} aValues
Array of part values to be formatted; contains in the following order: Measure or
amount, unit or currency, and the corresponding customizing. The first call to this
method where all parts are set determines the customizing; subsequent calls use this
customizing, so that the corresponding part may be omitted. Changes to the customizing
part after this first method call are not considered: The customizing for this instance
remains unchanged.
@param {string} sTargetType
The target type; must be "string" or a type with "string" as its
{@link sap.ui.base.DataType#getPrimitiveType primitive type}.
See {@link sap.ui.model.odata.type} for more information.
@returns {string}
The formatted output value; <code>null</code>, if <code>aValues</code> is
<code>undefined</code> or <code>null</code> or if the measure or amount, the unit or
currency or the corresponding customizing contained therein is <code>undefined</code>.
@throws {sap.ui.model.FormatException}
If <code>sTargetType</code> is unsupported

@function
@name sap.ui.model.odata.type.UnitMixin#formatValue
@public
@since 1.63.0
Formats the given values of the parts of the composite type to the given target type .