From da2389891e0fdbaf57fb6a890d6a0a7e3d63fcfa Mon Sep 17 00:00:00 2001 From: Usoka <27248545+Usoka@users.noreply.github.com> Date: Sun, 2 May 2021 21:31:04 +1200 Subject: [PATCH] Add upperFirst function --- backend/src/templateFormatter.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/templateFormatter.ts b/backend/src/templateFormatter.ts index 7ac3428c..e3575301 100644 --- a/backend/src/templateFormatter.ts +++ b/backend/src/templateFormatter.ts @@ -316,6 +316,10 @@ const baseValues = { if (typeof arg !== "string") return arg; return arg.toUpperCase(); }, + upperFirst(arg) { + if (typeof arg !== "string") return arg; + return arg.charAt(0).toUpperCase() + arg.slice(1); + }, rand(from, to, seed = null) { if (isNaN(from)) return 0;