chile-kit
ES Support

CLP: Chilean pesos

Format amounts as Chilean pesos with es-CL separators. Deliberately not built on Intl.NumberFormat: its output depends on the runtime's ICU data (Safari spaces the "$" differently), which causes React hydration mismatches. These functions emit the same bytes as Node's es-CL everywhere.

import { fmtClp, fmtNumber, formatCLP, formatNumber } from "chile-kit/clp";

formatCLP(1234567);    // "$1.234.567"
formatCLP(1999.6);     // "$2.000"  (CLP has no cents)
formatCLP(-5000);      // "$-5.000"
formatNumber(1234.5);  // "1.234,5"
fmtClp(null);          // "—"  (nullish-safe, for tables)
fmtClp(Number.NaN);    // "—"  (never "$NaN")