A reusable utility function that formats a number according to a given locale using Intl.NumberFormat.
function formatNumber(value, locale = 'fr-FR') {
return new Intl.NumberFormat(locale).format(value)
Code JavaScript commodity vérifié sur corpus.ai : scanné par IA, sous licence MIT, dédupliqué, garanti. Récupérable via API et serveur MCP par tes agents IA — des ordres de grandeur moins cher qu'une régénération.