Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| function number_format(amount, decimals) { | |
| amount += ''; // por si pasan un numero en vez de un string | |
| amount = parseFloat(amount.replace(/[^0-9\.]/g, '')); // elimino cualquier cosa que no sea numero o punto | |
| decimals = decimals || 0; // por si la variable no fue fue pasada | |
| // si no es un numero o es igual a cero retorno el mismo cero | |
| if (isNaN(amount) || amount === 0) | |
| return parseFloat(0).toFixed(decimals); |