Skip to content

Commit

Permalink
style: 🚧 apply changes reported by eslint and prettier and update dep…
Browse files Browse the repository at this point in the history
…endencies
  • Loading branch information
luffynando committed Aug 1, 2024
1 parent 0eeae10 commit 5c36631
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@
"@jsprismarine/typedoc-material-theme": "^1.0.4",
"@nodecfdi/cfdi-core": "^0.4.0",
"@nodecfdi/cfdi-expresiones": "^3.0.0",
"@nodecfdi/eslint-config": "^1.9.1",
"@nodecfdi/eslint-config": "^1.9.2",
"@nodecfdi/prettier-config": "^1.1.1",
"@nodecfdi/tsconfig": "^1.5.0",
"@types/node": "^20.14.13",
"@types/pdfmake": "^0.2.9",
"@vitest/coverage-istanbul": "^2.0.4",
"@vitest/coverage-istanbul": "^2.0.5",
"conventional-changelog-cli": "^5.0.0",
"conventional-changelog-conventionalcommits": "^8.0.0",
"eslint": "^8.57.0",
Expand All @@ -98,7 +98,7 @@
"tshy": "^3.0.2",
"typedoc": "^0.26.5",
"typescript": "^5.5.4",
"vitest": "^2.0.4"
"vitest": "^2.0.5"
},
"peerDependencies": {
"@nodecfdi/cfdi-core": "^0.4.0",
Expand Down
8 changes: 4 additions & 4 deletions src/utils/currency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const evaluateThousandsOfMillions = (

return {
numberToCurrency: fixedNumberToCurrency,
integers: integers.slice(-9, integers.length),
integers: integers.slice(-9),
};
};

Expand All @@ -130,7 +130,7 @@ const evaluateMillions = (

return {
numberToCurrency: fixedNumberToCurrency,
integers: integers.slice(-6, integers.length),
integers: integers.slice(-6),
};
};

Expand All @@ -139,7 +139,7 @@ export const toCurrency = (initial: number, moneda = 'MXN'): string => {
const number = initial.toFixed(2);
// Separate decimals (only 2) and integers
let integers = number.slice(0, Math.max(0, number.indexOf('.')));
const decimals = number.slice(number.indexOf('.') + 1, number.length);
const decimals = number.slice(number.indexOf('.') + 1);
const monedaName = moneda === 'MXN' ? 'M.N.' : moneda;
// Initialize string to store currency
let numberToCurrency = '';
Expand Down Expand Up @@ -187,7 +187,7 @@ export const toCurrency = (initial: number, moneda = 'MXN'): string => {
}
}

integers = integers.slice(-3, integers.length);
integers = integers.slice(-3);
}

// Evaluate hundreds
Expand Down

0 comments on commit 5c36631

Please sign in to comment.