META-INF.resources.bower_components.globalize.dist.globalize-runtime.plural.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-globalize Show documentation
Show all versions of jwebmp-globalize Show documentation
The JWebSwing implementation for a full Globalization
(function(root,factory){if(typeof define==="function"&&define.amd){define(["../globalize-runtime"],factory)}else if(typeof exports==="object"){module.exports=factory(require("../globalize-runtime"))}else{factory(root.Globalize)}})(this,function(Globalize){var runtimeKey=Globalize._runtimeKey,validateParameterPresence=Globalize._validateParameterPresence,validateParameterType=Globalize._validateParameterType;var validateParameterTypeNumber=function(value,name){validateParameterType(value,name,value===undefined||typeof value==="number","Number")};var pluralGeneratorFn=function(plural){return function pluralGenerator(value){validateParameterPresence(value,"value");validateParameterTypeNumber(value,"value");return plural(value)}};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});