Skip to content

Conversation

Theo-Fourniez
Copy link

  • Passed the unit tests
  • Added unit tests for the special case

Closes #38

if (words.length > 4) words = words.slice(0, 3)

let word = camelCase(words.join(' ').replace(/[^a-zA-Z ]/g, ''))
let word = camelCase(words.join(' ').replace(/[^a-zA-Z ]/g, '').replace(/\s\s+/g, ' '))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a chained .replace to remove whitespaces that caused the crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when a string to translate contains specific characters ?

1 participant