dodo / node-slug

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

Throw error if null or undefined #65

Open benvmatheson opened 8 years ago

benvmatheson commented 8 years ago

If undefined is passed in, this will return an empty string instead of an error. Not sure if this error is preferred to just returning an empty string though.

lillem4n commented 6 years ago

I'd argue null or undefined as slugified should exactly an empty string. I think throwing on this would generally cause more issues than help.