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

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

There is a newer version: 0.66.0.1
Show newest version
define([
    "./common/runtime-key",
    "./core-runtime",
    "./unit/formatter-fn",

    "./number-runtime",
    "./plural-runtime"
], function (runtimeKey, Globalize, unitFormatterFn) {

    Globalize._unitFormatterFn = unitFormatterFn;

    Globalize.formatUnit =
        Globalize.prototype.formatUnit = function (value, unit, options) {
            return this.unitFormatter(unit, options)(value);
        };

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

    return Globalize;

});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy