scurker/currency.js

A javascript library for handling currencies

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 25 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 20th, 2026
Created on May 16th, 2013
Open Issues & Pull Requests: 63 (+0)
GitHub issues: Enabled
Number of forks: 145
Total Stargazers: 3,378 (+0)
Total Subscribers: 21 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 4
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,318 days
Stale 30+ days: 3
Stale 90+ days: 3

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

currency.js is a lightweight JavaScript library for handling currency values.

The library solves floating point precision problems that arise when performing arithmetic with decimal numbers in JavaScript. It works by storing currency values as integers internally, converting between the integer representation and decimal display formats as needed. This approach avoids the rounding errors that occur when JavaScript performs calculations on floating point numbers directly. The library handles any reasonable currency value up to 90,071,992,547,409.91 in the minor currency unit.

The tool suits projects that need reliable currency arithmetic without external dependencies. It works with numbers, strings, or existing currency instances as input, and provides arithmetic methods, formatting options, and locale customization. The formatting system supports custom patterns, separators, decimal characters, and symbols, with built-in support for the Indian Numbering System. Developers can also supply custom format functions when the provided options are insufficient. The library includes an increment option for currencies that require rounding to specific values.

The project maintains a stable, minimal codebase with no external dependencies. Development activity shows consistent attention to bug fixes and feature requests, with responsive engagement on issues and pull requests. The maintainers prioritize backward compatibility and keep the library size small, making it suitable for inclusion in performance-sensitive applications.