Language: JavaScript
Label: safe
CWE: CWE-829 \u2014 Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.

Code:
function to_money(
    number, 
    decimalPlaces = null,
    decimalSeparator = "",
	thousandSeparator = "",
	currencySymbol = "",
	currencySymbolPosition = ""
    ) {

        var currencySymbol = empty(currencySymbol) ? get_options("currencySymbol") : currencySymbol;
        var currencySymbolPosition = empty(currencySymbolPosition) ? get_options("currencySymbolPosition") : currencySymbolPosition;

        var formatedNumber = format_number(number, decimalPlaces = decimalPlaces, decimalSeparator = decimalSeparator, thousandSeparator = thousandSeparator);

        if( !empty(currencySymbolPosition) && currencySymbolPosition.toLowerCase === "right" ) {
            formatedNumber = formatedNumber + " " +  currencySymbol;
        } else {
            formatedNumber = currencySymbol + " " + formatedNumber;
        }

        return formatedNumber;
}