@actual-app/api 25.3.0 → 25.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54642,12 +54642,12 @@ CREATE TABLE kvcache_key (id INTEGER PRIMARY KEY, key REAL);
54642
54642
  let integer, fraction;
54643
54643
  // match the last dot or comma in the string
54644
54644
  const match = currencyAmount.match(/[,.](?=[^.,]*$)/);
54645
- if (!match || match[0] === getNumberFormat().thousandsSeparator && match.index + 4 === currencyAmount.length) {
54645
+ if (!match || match[0] === getNumberFormat().thousandsSeparator && match.index + 4 <= currencyAmount.length) {
54646
54646
  fraction = null;
54647
- integer = currencyAmount.replace(/\D/g, '');
54647
+ integer = currencyAmount.replace(/[^\d-]/g, '');
54648
54648
  }
54649
54649
  else {
54650
- integer = currencyAmount.slice(0, match.index).replace(/\D/g, '');
54650
+ integer = currencyAmount.slice(0, match.index).replace(/[^\d-]/g, '');
54651
54651
  fraction = currencyAmount.slice(match.index + 1);
54652
54652
  }
54653
54653
  const amount = parseFloat(integer + '.' + fraction);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "25.3.0",
3
+ "version": "25.3.1",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "25.3.0",
3
+ "version": "25.3.1",
4
4
  "license": "MIT",
5
5
  "description": "An API for Actual",
6
6
  "engines": {