mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-03 04:49:13 -04:00
refactor(lint): linter auto fix
This commit is contained in:
parent
8e29a97404
commit
086d31eab5
54 changed files with 1122 additions and 1503 deletions
|
@ -1,7 +1,21 @@
|
|||
export function arabicToRoman(num: number) {
|
||||
if (num < 1) return '';
|
||||
|
||||
const lookup: { [key: string]: number } = { M: 1000, CM: 900, D: 500, CD: 400, C: 100, XC: 90, L: 50, XL: 40, X: 10, IX: 9, V: 5, IV: 4, I: 1 };
|
||||
const lookup: { [key: string]: number } = {
|
||||
M: 1000,
|
||||
CM: 900,
|
||||
D: 500,
|
||||
CD: 400,
|
||||
C: 100,
|
||||
XC: 90,
|
||||
L: 50,
|
||||
XL: 40,
|
||||
X: 10,
|
||||
IX: 9,
|
||||
V: 5,
|
||||
IV: 4,
|
||||
I: 1,
|
||||
};
|
||||
let roman = '';
|
||||
for (const i in lookup) {
|
||||
while (num >= lookup[i]) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue