Skip to content

Commit

Permalink
closes TryQuiet#2299
Browse files Browse the repository at this point in the history
  • Loading branch information
richardtorres314 committed May 15, 2024
1 parent 785a8ea commit 9986dde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/naming.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe('Naming policy utility functions', () => {
it.each([
['---', '---'],
[' ', '-'],
['UPPERCASE', 'uppercase'],
['UPPERCASE', 'UPPERCASE'],
['lowercase', 'lowercase'],
['!@#$%^&*()', '----------'],
])('name "%s" gets corrected to "%s"', async (name: string, corrected: string) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/naming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
* @returns string with special characters replaced with a hyphen
*/
export const parseName = (name = '') => {
return name.replace(/[^\w._-]/g, '-').toLowerCase()
return name.replace(/[^\w._-]/g, '-')
}

0 comments on commit 9986dde

Please sign in to comment.