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

META-INF.resources.bower_components.globalize.dist.globalize-runtime.min.js Maven / Gradle / Ivy

There is a newer version: 1.2.2.1-jre17
Show newest version
(function(root,factory){if(typeof define==="function"&&define.amd){define(factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.Globalize=factory()}})(this,function(){var toString=function(variable){return typeof variable==="string"?variable:typeof variable==="number"?""+variable:JSON.stringify(variable)};var formatMessage=function(message,data){message=message.replace(/{[0-9a-zA-Z-_. ]+}/g,function(name){name=name.replace(/^{([^}]*)}$/,"$1");return toString(data[name])});return message};var objectExtend=function(){var destination=arguments[0],sources=[].slice.call(arguments,1);sources.forEach(function(source){var prop;for(prop in source){destination[prop]=source[prop]}});return destination};var createError=function(code,message,attributes){var error;message=code+(message?": "+formatMessage(message,attributes):"");error=new Error(message);error.code=code;objectExtend(error,attributes);return error};var stringHash=function(str){return[].reduce.call(str,function(hash,i){var chr=i.charCodeAt(0);hash=(hash<<5)-hash+chr;return hash|0},0)};var runtimeKey=function(fnName,locale,args,argsStr){var hash;argsStr=argsStr||JSON.stringify(args);hash=stringHash(fnName+locale+argsStr);return hash>0?"a"+hash:"b"+Math.abs(hash)};var validate=function(code,message,check,attributes){if(!check){throw createError(code,message,attributes)}};var validateParameterPresence=function(value,name){validate("E_MISSING_PARAMETER","Missing required parameter `{name}`.",value!==undefined,{name:name})};var validateParameterType=function(value,name,check,expected){validate("E_INVALID_PAR_TYPE","Invalid `{name}` parameter ({value}). {expected} expected.",check,{expected:expected,name:name,value:value})};var validateParameterTypeString=function(value,name){validateParameterType(value,name,value===undefined||typeof value==="string","a string")};var regexpEscape=function(string){return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")};var stringPad=function(str,count,right){var length;if(typeof str!=="string"){str=String(str)}for(length=str.length;length




© 2015 - 2025 Weber Informatics LLC | Privacy Policy