The `parsecurrency` package provides a minimalist utility for parsing currency strings, extracting components such as the numerical value, currency symbol, decimal and group separators, and ISO code. Currently at version 1.1.1, the package was last updated over six years ago and appears to be abandoned, with no active development or maintenance. While it supports many common international currency formats, including Indian numbering, it has explicit limitations, notably an inability to process currencies with three decimal places or two-character group separators. Due to its age, it primarily supports CommonJS imports, and users should be aware of potential compatibility issues in modern ESM-only environments and the lack of ongoing security patches or feature enhancements.
npm install parsecurrencyVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing various currency string formats, including positive and negative values, with different symbols, group, and decimal separators, returning a structured object.
Consider alternative, actively maintained currency parsing libraries for production use, especially in environments requiring up-to-date security or feature support.
For ESM projects, use `import parseCurrency from 'parsecurrency'` and ensure your build tools (e.g., Webpack, Rollup) are configured to handle CommonJS modules. Alternatively, seek an ESM-native parsing library.
Manually preprocess inputs with three decimals (e.g., truncate or round) before passing them to `parsecurrency`, or use a different library that explicitly supports this format.
Manually preprocess such inputs to remove or replace the problematic separator before parsing, or use an alternative library with broader internationalization support.
Use the CommonJS `require` syntax for Node.js projects: `const parseCurrency = require('parsecurrency');`. For ESM, try `import parseCurrency from 'parsecurrency';`.Review the library's limitations and compare them with your input format. For unsupported formats, consider preprocessing the input, using a more robust internationalization library, or implementing custom parsing logic.
No dependency data recorded yet.