Sha256: fef1283785173f9db0566527da60d855d98fbe3fe66017a2ed1608aaa8ca7896
Contents?: true
Size: 435 Bytes
Versions: 3
Compression:
Stored size: 435 Bytes
Contents
export function round (value) { return Math.round(value * 100) / 100 } export function printCurrency (value, simboloMoneda = '$') { const decimals = (value % 1 > 0) ? 2 : 0 return simboloMoneda + ' ' + numberWithDots(value.toFixed(decimals).replace('.', ',')) } export function showPercentage (value) { return '% ' + value } export function numberWithDots (x) { return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.') }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pg_rails-7.0.8.pre.alpha.11 | pg_layout/app/javascript/utils.ts |
pg_rails-7.0.8.pre.alpha.10 | pg_layout/app/javascript/utils.ts |
pg_rails-7.0.8.pre.alpha.9 | pg_layout/app/javascript/utils.ts |