Created
February 25, 2021 16:14
-
-
Save jeshuamaxey/d2a1017234dcbafcf11371f78791fe95 to your computer and use it in GitHub Desktop.
Converts arbitrary string into slack-compatible emoji letters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gimmeSweetEmojis = (input) => { | |
let output = ""; | |
input | |
.split("") | |
.map(l => l.toLowerCase()) | |
.forEach(letter => { | |
if (letter.match(/[a-z]/i)) output += `:alphabet-yellow-${letter}: ` | |
else output += letter; | |
}) | |
return output | |
} | |
gimmeSweetEmojis("hello sinead") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you'll find this is even more obnoxious