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.

Evaluated Mar 06, 2026 (0d ago) v2.x
Homepage ↗ Repo ↗ Developer Tools number-formatting currency percentage locale numeral formatting
⚙ Agent Friendliness
63
/ 100
Can an agent use this?
🔒 Security
95
/ 100
Is it safe for agents?
⚡ Reliability
84
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
78
Error Messages
68
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
65
Secret Handling
100

MIT licensed. Unmaintained — security vulnerabilities may not be patched. Local computation only. Low risk for pure formatting use.

⚡ Reliability

Uptime/SLA
90
Version Stability
88
Breaking Changes
85
Error Recovery
72
AF Security 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

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Local library — no authentication required. MIT licensed.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed. Zero cost. Warning: largely unmaintained.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

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.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered