From c7758eb9f0a714ffbcc65c42c7cbf0b541430748 Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 11 Oct 2023 19:31:45 +0200 Subject: [PATCH] Add documentation. --- source/storage/user-label.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/storage/user-label.ts b/source/storage/user-label.ts index 146a32c..7a55a30 100644 --- a/source/storage/user-label.ts +++ b/source/storage/user-label.ts @@ -68,6 +68,11 @@ export async function saveUserLabels( } } +/** + * Create a new user label ID by getting the current highest existing ID in + * storage and adding 1 to it. Defaults to 1 when no there are no existing + * labels. + */ export async function newUserLabelId(): Promise { const userLabels = await collectUserLabels(); let newId = 1;