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

Override globally default config #53

Open
StErMi opened this issue Mar 8, 2019 · 1 comment
Open

Override globally default config #53

StErMi opened this issue Mar 8, 2019 · 1 comment
Labels

Comments

@StErMi
Copy link

StErMi commented Mar 8, 2019

Hi, is there a way to override the default configuration?
I want to have all the slugify strings get to lower by default and I don't want to specify them every time when calling the methods.

Thanks

@Livijn
Copy link

Livijn commented Apr 7, 2019

Just re-define the function. i.e.:

import slugify from 'slugify';
window.slugify = (str, conf) => slugify(str, { ...conf, lower: true });

@simov simov added the question label Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants