PageSourceSearch

https://patoto.org/js/price-utils.min.js

js patoto.org collected 2026-10-01 00:49:06 UTC 2,192 bytes, 10 lines download raw bytes

1(function(){'use strict';var globalPriceFormat={requiredPrecision:2,integerRequired:1,decimalSymbol:',',groupSymbol:'.',groupLength:','};function stringPad(string,times){return(new Array(times+1)).join(string);}
2function formatPrice(amount,format,isShowSign){var s='',precision,integerRequired,decimalSymbol,groupSymbol,groupLength,pattern,i,pad,j,re,r,am;format.decimalSymbol=',';format.groupSymbol='.';format=_.extend(globalPriceFormat,format);precision=isNaN(format.requiredPrecision=Math.abs(format.requiredPrecision))?2:format.requiredPrecision;integerRequired=isNaN(format.integerRequired=Math.abs(format.integerRequired))?1:format.integerRequired;decimalSymbol=format.decimalSymbol===undefined?',':format.decimalSymbol;groupSymbol=format.groupSymbol===undefined?'.':format.groupSymbol;groupLength=format.groupLength===undefined?3:format.groupLength;pattern=format.pattern||'%s';if(isShowSign===undefined||isShowSign===true){s=amount<0?'-':isShowSign?'+':'';}else if(isShowSign===false){s='';}
3pattern=pattern.indexOf('{sign}')<0?s+pattern:pattern.replace('{sign}',s);i=parseInt(amount=Number(Math.round(Math.abs(+amount||0)+'e+'+precision)+('e-'+precision)),10)+'';pad=i.length<integerRequired?integerRequired-i.length:0;i=stringPad('0',pad)+i;j=i.length>groupLength?i.length%groupLength:0;re=new RegExp('(\\d{'+groupLength+'})(?=\\d)','g');am=Number(Math.round(Math.abs(amount-i)+'e+'+precision)+('e-'+precision));r=(j?i.substr(0,j)+groupSymbol:'')+
4i.substr(j).replace(re,'$1'+groupSymbol)+
5(precision?decimalSymbol+am.toFixed(precision).replace(/-/,0).slice(2):'');return pattern.replace('%s',r).replace(/^\s\s*/,'').replace(/\s\s*$/,'');}
6function objectDeepClone(obj){return JSON.parse(JSON.stringify(obj));}
7function findOptionId(element){var re,id,name;if(!element){return id;}
8name=$(element).attr('name');if(name.indexOf('[')!==-1){re=/\[([^\]]+)?\]/;}else{re=/_([^\]]+)?_/;}
9id=re.exec(name)&&re.exec(name)[1];if(id){return id;}}
10$.catalog=$.catalog||{};$.catalog.priceUtils={formatPrice:formatPrice,deepClone:objectDeepClone,strPad:stringPad,findOptionId:findOptionId,getPriceFormat:globalPriceFormat};$.breezemap['Magento_Catalog/js/price-utils']=$.catalog.priceUtils;})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.