From 08836f00087e212a6fdc9aa4cf7e87192d609d11 Mon Sep 17 00:00:00 2001 From: Adam Laycock Date: Tue, 28 Mar 2023 15:39:37 +0100 Subject: [PATCH] docs: add docs for invertString --- src/functions/strings.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/functions/strings.ts b/src/functions/strings.ts index 1df0ee6..6751b22 100644 --- a/src/functions/strings.ts +++ b/src/functions/strings.ts @@ -15,6 +15,11 @@ export const rndFromString = (string: string, base: number = 1) => { return Math.round((n - Math.floor(n)) * base) } +/** + * Inverts alphabetic characters, `abc` becomes `zyx`. + * + * @param string The string to invert + */ export const invertString = (string: string) => { return string .split('')