Numeral.js
JavaScript number formatting library for formatting and manipulating numbers with locale support. Formats numbers as currency ($1,234.56), percentages (12.3%), file sizes (1.2GB), and custom patterns. Supports locale-aware formatting and arithmetic operations that avoid JavaScript floating-point issues. Note: package has been mostly unmaintained since 2019.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
MIT licensed. Unmaintained — security vulnerabilities may not be patched. Local computation only. Low risk for pure formatting use.
⚡ Reliability
Best When
You're maintaining a legacy codebase that already uses numeral.js and need consistent number formatting without introducing a new dependency.
Avoid When
Starting a new project — use Intl.NumberFormat (built-in), accounting.js, or d3-format instead. Numeral.js is effectively unmaintained.
Use Cases
- • Format currency values in agent financial dashboards and reports with locale-aware number formatting
- • Display file sizes as human-readable strings (bytes to KB/MB/GB) in agent file management interfaces
- • Format percentage values for agent analytics and reporting interfaces
- • Apply consistent number formatting patterns across agent-generated financial data output
- • Parse formatted number strings back to JavaScript numbers for agent data processing
Not For
- • New projects — numeral.js is largely unmaintained (last release 2019); prefer Intl.NumberFormat (built-in) or accounting.js for currency
- • Complex locale requirements — use the browser's built-in Intl.NumberFormat which has comprehensive locale support
- • BigDecimal arithmetic — numeral has floating-point limitations for financial calculations; use decimal.js or big.js
Interface
Authentication
Local library — no authentication required. MIT licensed.
Pricing
MIT licensed. Zero cost. Warning: largely unmaintained.
Agent Metadata
Known Gotchas
- ⚠ numeral.js is effectively unmaintained — last npm release was 2019; evaluate if Intl.NumberFormat or accounting.js better suits new projects
- ⚠ Invalid format strings silently return '0' — always test format strings before production use
- ⚠ numeral(value).format(formatString) API — create numeral instance then call format; not a direct static function
- ⚠ Locale registration required for non-English: numeral.register('locale', 'de', { ... }); numeral.locale('de') — no automatic browser locale detection
- ⚠ Floating-point arithmetic: numeral(0.1).add(0.2) may not equal 0.3 exactly — numeral does not fully solve JS floating-point; use decimal.js for precise financial math
- ⚠ ES module support is not official — may require bundler configuration for some project setups
Alternatives
Full Evaluation Report
Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Numeral.js.
Scores are editorial opinions as of 2026-03-06.