geld is a minimal currency formatter for Node.js (>=22) and browsers, providing a simple function to format numbers as currency strings. It offers options for currency symbol, decimal and group separators, position of currency symbol, and a special zero-decimals placeholder. The package is ESM-only (CJS requires dynamic import) and ships TypeScript type definitions. Version 4.0.0 is the latest stable release. Its key differentiator is extreme minimalism and opinionated German defaults (Euro, comma decimal, dot thousands, no-break space).
npm install geldNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage with default German Euro formatter and custom options with US dollar formatting.
Upgrade to Node.js 22 or later, or stay on geld v3.x if you need older Node.
Use dynamic import: `const geld = await import('geld');` or set `"type": "module"` in package.json.Explicitly set `{ decimalSeparator: '.' }` if you need a period decimal.Override with `{ space: ' ' }` if you want a regular space.No deprecation planned; it is stable. Document clearly for international teams.
Use dynamic import: `const geld = await import('geld');` or convert your project to ESM.Use `const geld = require('geld').default;` or use dynamic import.Upgrade Node.js to ^22.0.0 or use geld v3 (which may support CJS).
No dependency data recorded yet.