node-slug icon indicating copy to clipboard operation
node-slug copied to clipboard

Ignore specific characters

Open webchaz opened this issue 9 years ago • 3 comments

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

webchaz avatar May 10 '16 18:05 webchaz

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

cyberwombat avatar Jun 11 '16 01:06 cyberwombat

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.

netpedro-com avatar Dec 03 '16 00:12 netpedro-com

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.

thinklinux avatar May 20 '17 06:05 thinklinux