Skip to content

Commit

Permalink
Utilize replaceAll to resolve naming issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Archit404Error committed Mar 2, 2024
1 parent ee1251b commit a7dc495
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const sendFormDM = async (form: Form, userEmails: string[]) => {

let channelTitle = form.title
.toLowerCase()
.replace(" ", "-")
.replace(/[.,\/#!$%\^&\*;:{}=`~()]/g, "");
.replaceAll(" ", "-")
.replaceAll(/[.,\/#!$%\^&\*;:{}=`~()]/g, "");
channelTitle = `${channelTitle}-reminder`;
console.log(`Attempting to create channel ${channelTitle}`);
const response = await slackbot.client.conversations.create({
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

/* Language and Environment */
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
"lib": [
"ES2021.String"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
// "jsx": "preserve", /* Specify what JSX code is generated. */
"experimentalDecorators": true /* Enable experimental support for legacy experimental decorators. */,
"emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
Expand Down

0 comments on commit a7dc495

Please sign in to comment.