dodo / node-slug

slugifies even utf-8 chars!
MIT License
1.07k stars 94 forks source link

Ignore specific characters #75

Open webchaz opened 8 years ago

webchaz commented 8 years ago

Is there a way to ignore certain characters? Specifically, I'm using this to clean up some image names, but I don't want to remove the period between the filename and extension, would be nice to just ignore periods.

Thanks

cyberwombat commented 8 years ago

Just figured out that adding remove: null as option leaves the period in place.

netpedro-com commented 7 years ago

It's really true, remove: null ignore periods/dots. But it's very difficult to guess this only reading README.md. Please, add a example to README.md.

thinklinux commented 7 years ago

So this means that pretty mode is the default one not the rfc3986. I couldn't figure this out from the readme as well :) @cyberwombat Thanks ^^

You can do slug.defaults.mode ='rfc3986'; as well.