All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.globalize.src.currency.name-format.js Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
define([
    "../common/format-message"
], function (formatMessage) {

    /**
     * nameFormat( formattedNumber, pluralForm, properties )
     *
     * Return the appropriate name form currency format.
     */
    return function (formattedNumber, pluralForm, properties) {
        var displayName, unitPattern,
            displayNames = properties.displayNames || {},
            unitPatterns = properties.unitPatterns;

        displayName = displayNames["displayName-count-" + pluralForm] ||
            displayNames["displayName-count-other"] ||
            displayNames.displayName ||
            properties.currency;
        unitPattern = unitPatterns["unitPattern-count-" + pluralForm] ||
            unitPatterns["unitPattern-count-other"];

        return formatMessage(unitPattern, [formattedNumber, displayName]);
    };

});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy