dm_slice.ts prettier logic

This commit is contained in:
kdh8219 2023-06-12 00:28:41 +09:00
parent 5b385a3fe0
commit 08569c1b41
Signed by: kdh8219
GPG key ID: 9B901BE907D1862E

View file

@ -11,14 +11,13 @@ export function dm_slice(raw: string): string[] {
} }
const output: string[] = []; const output: string[] = [];
let slashed = { front: null, end: raw };
let slashed = slasher(raw);
while (true) { while (true) {
output.push(slashed.front);
if (slashed.end) { if (slashed.end) {
slashed = slasher(slashed.end); slashed = slasher(slashed.end);
} else { } else {
return output; return output;
} }
output.push(slashed.front);
} }
} }