aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/stringUtils.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-27 21:54:39 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-27 21:54:39 -0700
commit236b10503612706ed914678d942ac604f2973f47 (patch)
treee557381dbdc721002346a0fc64b1a679280fa3f1 /modern/src/common/stringUtils.js
parent96af05dbf2171c4e194cf67c3c93d134ef467e50 (diff)
downloadtrackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.gz
trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.bz2
trackermap-web-236b10503612706ed914678d942ac604f2973f47.zip
Implement notification settings
Diffstat (limited to 'modern/src/common/stringUtils.js')
-rw-r--r--modern/src/common/stringUtils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/modern/src/common/stringUtils.js b/modern/src/common/stringUtils.js
new file mode 100644
index 00000000..7bd68c85
--- /dev/null
+++ b/modern/src/common/stringUtils.js
@@ -0,0 +1,7 @@
+export const prefixString = (prefix, value) => {
+ return prefix + value.charAt(0).toUpperCase() + value.slice(1);
+}
+
+export const unprefixString = (prefix, value) => {
+ return value.charAt(prefix.length).toLowerCase() + value.slice(prefix.length + 1);
+}