PageSourceSearch

https://www.rails.com/cdn/shop/t/1622/assets/currency-vite-CdPOxbL7.js

js rails.com collected 2026-09-25 14:09:49 UTC 630 bytes, 1 lines download raw bytes

1const u="${{amount}}";function d(a,n){typeof a=="string"&&(a=a.replace(".",""));let o="";const i=/\{\{\s*(\w+)\s*\}\}/,s=n||u;function t(e,c=2,l=",",m="."){if(isNaN(e)||e==null)return 0;e=(e/100).toFixed(c);const r=e.split("."),_=r[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${l}`),p=r[1]?m+r[1]:"";return _+p}switch(s.match(i)[1]){case"amount":o=t(a,2);break;case"amount_no_decimals":o=t(a,0);break;case"amount_with_comma_separator":o=t(a,2,".",",");break;case"amount_no_decimals_with_comma_separator":o=t(a,0,".",",");break;case"money_without_trailing_zeros":o=t(a,2).replace(".00","");break}return s.replace(i,o)}export{d as f};

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.