expensify-common 2.0.191 → 2.0.193
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.
- package/dist/Num.js +2 -2
- package/dist/esm/Num.js +2 -2
- package/package.json +6 -1
package/dist/Num.js
CHANGED
|
@@ -175,8 +175,8 @@ exports.default = {
|
|
|
175
175
|
* @returns {number} The amount of tax
|
|
176
176
|
*/
|
|
177
177
|
calculateTaxFromPercentage(total, percentage) {
|
|
178
|
-
const percentageAsDecimal = str_1.default.percentageStringToNumber(percentage) / 100;
|
|
179
|
-
const divisor =
|
|
178
|
+
const percentageAsDecimal = percentage ? str_1.default.percentageStringToNumber(percentage) / 100 : 0;
|
|
179
|
+
const divisor = percentageAsDecimal + 1;
|
|
180
180
|
return this.calculateTaxFromDivisor(total, divisor);
|
|
181
181
|
},
|
|
182
182
|
/**
|
package/dist/esm/Num.js
CHANGED
|
@@ -170,8 +170,8 @@ export default {
|
|
|
170
170
|
* @returns {number} The amount of tax
|
|
171
171
|
*/
|
|
172
172
|
calculateTaxFromPercentage(total, percentage) {
|
|
173
|
-
const percentageAsDecimal = Str.percentageStringToNumber(percentage) / 100;
|
|
174
|
-
const divisor =
|
|
173
|
+
const percentageAsDecimal = percentage ? Str.percentageStringToNumber(percentage) / 100 : 0;
|
|
174
|
+
const divisor = percentageAsDecimal + 1;
|
|
175
175
|
return this.calculateTaxFromDivisor(total, divisor);
|
|
176
176
|
},
|
|
177
177
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expensify-common",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.193",
|
|
4
4
|
"author": "Expensify, Inc.",
|
|
5
5
|
"description": "Expensify libraries and components shared across different repos",
|
|
6
6
|
"homepage": "https://expensify.com",
|
|
@@ -304,6 +304,11 @@
|
|
|
304
304
|
"typescript": "^5.7.2",
|
|
305
305
|
"typescript-eslint": "^8.61.0"
|
|
306
306
|
},
|
|
307
|
+
"overrides": {
|
|
308
|
+
"minimatch@3": {
|
|
309
|
+
"brace-expansion": "1.1.12"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
307
312
|
"browserify": {
|
|
308
313
|
"transform": [
|
|
309
314
|
[
|