feat(client): add edge name generator
This commit is contained in:
8
client/src/utils/edge.ts
Normal file
8
client/src/utils/edge.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
function edgeTitleGenerator(counter: number) {
|
||||||
|
const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
const num = Math.ceil(counter / chars.length);
|
||||||
|
const letterIndex = (counter - 1) % chars.length;
|
||||||
|
return `${chars[letterIndex]}${num}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
export { edgeTitleGenerator };
|
Reference in New Issue
Block a user