diff --git a/client/src/utils/edge.ts b/client/src/utils/edge.ts new file mode 100644 index 0000000..766e673 --- /dev/null +++ b/client/src/utils/edge.ts @@ -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 };