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

META-INF.resources.bower_components.globalize.src.plural-runtime.js Maven / Gradle / Ivy

There is a newer version: 0.66.0.1
Show newest version
define([
    "./common/runtime-key",
    "./common/validate/parameter-presence",
    "./common/validate/parameter-type/number",
    "./core-runtime",
    "./plural/generator-fn"
], function (runtimeKey, validateParameterPresence, validateParameterTypeNumber, Globalize,
             pluralGeneratorFn) {

    Globalize._pluralGeneratorFn = pluralGeneratorFn;
    Globalize._validateParameterTypeNumber = validateParameterTypeNumber;

    Globalize.plural =
        Globalize.prototype.plural = function (value, options) {
            validateParameterPresence(value, "value");
            validateParameterTypeNumber(value, "value");
            return this.pluralGenerator(options)(value);
        };

    Globalize.pluralGenerator =
        Globalize.prototype.pluralGenerator = function (options) {
            options = options || {};
            return Globalize[runtimeKey("pluralGenerator", this._locale, [options])];
        };

    return Globalize;

});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy