dm_slice.ts prettier logic
This commit is contained in:
parent
5b385a3fe0
commit
08569c1b41
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue