summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/stickers/sticker-id.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-20 11:31:17 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-20 11:31:17 +0200
commit3e89d2998588f8e35c524e523ba2ee853f0f6475 (patch)
tree57221f96c1259b3b07e3ddf8c1adefc502b9d8eb /apps/web/src/lib/stickers/sticker-id.ts
parent729d10592f4e802f91c555c309ff3ba4b119f843 (diff)
downloadopencut-3e89d2998588f8e35c524e523ba2ee853f0f6475.tar.gz
refactor: restructure files to their domains, new preview overlay system, and dep graph
Diffstat (limited to 'apps/web/src/lib/stickers/sticker-id.ts')
-rw-r--r--apps/web/src/lib/stickers/sticker-id.ts34
1 files changed, 0 insertions, 34 deletions
diff --git a/apps/web/src/lib/stickers/sticker-id.ts b/apps/web/src/lib/stickers/sticker-id.ts
deleted file mode 100644
index cb56db4c..00000000
--- a/apps/web/src/lib/stickers/sticker-id.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-export function parseStickerId({ stickerId }: { stickerId: string }): {
- providerId: string;
- providerValue: string;
-} {
- const normalizedStickerId = stickerId.trim();
- if (!normalizedStickerId) {
- throw new Error("Sticker ID must be a non-empty string");
- }
-
- const separatorIndex = normalizedStickerId.indexOf(":");
- if (
- separatorIndex <= 0 ||
- separatorIndex === normalizedStickerId.length - 1
- ) {
- throw new Error(
- `Invalid sticker ID format: "${stickerId}". Expected "provider:value".`,
- );
- }
-
- const providerId = normalizedStickerId.slice(0, separatorIndex).trim();
- const providerValue = normalizedStickerId.slice(separatorIndex + 1).trim();
-
- return { providerId, providerValue };
-}
-
-export function buildStickerId({
- providerId,
- providerValue,
-}: {
- providerId: string;
- providerValue: string;
-}): string {
- return `${providerId}:${providerValue}`;
-}