Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty replacement #52

Closed
abdonrd opened this issue Jun 16, 2020 · 1 comment · Fixed by #53
Closed

Allow empty replacement #52

abdonrd opened this issue Jun 16, 2020 · 1 comment · Fixed by #53
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@abdonrd
Copy link

abdonrd commented Jun 16, 2020

My use case is create usernames without separator.
Following the documentation: https://github.com/sindresorhus/slugify#separator

I have tried with:

slugify('BAR and baz', {separator: ''});

And I expect this:

'barandbaz'

But I get an error:

SyntaxError: Invalid regular expression: /{2,}/: Nothing to repeat
@sindresorhus
Copy link
Owner

Sure. PR welcome.

@sindresorhus sindresorhus added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants