dodo / node-slug

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

Add default for lowercase, and ability to turn off lowercase if wanted #32

Closed niftylettuce closed 9 years ago

niftylettuce commented 9 years ago

Having to do .toLowerCase() every time is very annoying, please fix this @dodo as similar to how you did with pretty.

a00andos commented 9 years ago

+2

gmotruk commented 9 years ago

+1

oitozero commented 9 years ago

+1

gimenete commented 9 years ago

+1

callaars commented 9 years ago

+1

pwlmaciejewski commented 9 years ago

+1

BrunoBernardino commented 9 years ago

+1

jeduan commented 9 years ago

:+1:

anotheri commented 9 years ago

+1

tmcpro commented 9 years ago

+1

diego-pacheco commented 9 years ago

+1

s-silva commented 9 years ago

:+1:

iangthornton commented 9 years ago

+1

oliverbenns commented 9 years ago

+1

Sicria commented 9 years ago

+1

Zertz commented 9 years ago

Seems like @dodo has vanished or is otherwise busy. I'll probably end up forking the project to implement my PR as well as a couple others.

dominhhai commented 9 years ago

@Zertz Do you have any plan to merge other PRs and publishing this? seems that @dodo so busy to get the work done. May we force then merge the possible PRs, and publish?

dodo commented 9 years ago

I merged @Zertz's PR and restricted the default to lower case only to rfc3986 mode, so the pretty mode stays case sensitive. I also changed the option name to lower instead of lowercase.

Let me know when this is not working out for you.

Zertz commented 9 years ago

Thanks @dodo !

niftylettuce commented 8 years ago

Why do we still have Pretty Mode on? The default should be the standard RFC3986. Come on.

niftylettuce commented 8 years ago

https://github.com/dodo/node-slug/blob/master/slug.js#L72-L74 Change this to RFC3986 please.

niftylettuce commented 8 years ago

In the Readme you say it is RFC3986 which is so misleading too.

screen shot 2015-11-19 at 12 58 58 pm

niftylettuce commented 8 years ago

Can you please fix this? The default should be RFC 3986... especially if you advertise it in the Readme as "respecting RFC 3986". I have forked this and made it RFC compliant by default. For anyone that wants this, please install it with npm install --save slug-rfc and that way we don't need to use forks. When this package switches its default to RFC (if it does), then I will deprecate that package I made and delete my fork at https://github.com/niftylettuce/node-slug-rfc.

simison commented 8 years ago

@niftylettuce see #71

niftylettuce commented 8 years ago

I've wanted this for probably like a year now haha, already forked it and published an RFC compliant version...

callaars commented 8 years ago

Rant much. :)

simison commented 8 years ago

@niftylettuce:

Why should I bother to use that, it has a completely unrelated name. All I want is the default for this package to have the proper RFC advertised standards

Me too. And I want is someone to maintain some package. ;-)

I already forked it and published an RFC compliant version myself.

Sure! That's cool. @Zertz seems to have a lot of enthusiasm, too. You guys should just put up an organisation and publish your RFC version under the name RFCSlug, niftySlug or something... :-)

I pinged you in hopes that you'd talk with @Zertz about possibilities.

niftylettuce commented 8 years ago

Aye aye! @simison I commented over in that issue you referenced and mentioned how I realized you were not the original OP author. Maybe @Zertz just would want to use npm i --save slug-rfc instead. It's a bit easier to remember and type haha.

Zertz commented 8 years ago

@niftylettuce I'm sorry my efforts don't meet your expectations and you are correct, documentation has not been updated yet. I am working on this because I use node-slug a lot and the community has submitted many useful PR's, including yours. I am planning Node v6 compatibility, which is currently very hard because of the issue described in #70.

Also,

Slug, or land slug, is a common name for any apparently shell-less terrestrial gastropod mollusc.

callaars commented 8 years ago

It's nice @Zertz, it's not all about fame.

simison commented 8 years ago

Don't let the naming stop you guys. :-)

BTW I settled for using https://github.com/pid/speakingurl myself for now — has anyone had look at it? Seems to be well maintained. (Ping @pid)

pid commented 8 years ago

;-) pong

davidgilbertson commented 8 years ago

https://github.com/pid/speakingurl does the trick for me. I'm sure slug-rfc and mollusc work just as well, but downloads/day wins

niftylettuce commented 8 years ago

downloads have nothing to do with functionality.

niftylettuce commented 8 years ago

slug downloads:

screen shot 2016-05-29 at 2 03 28 pm

speakingurl downloads:

screen shot 2016-05-29 at 2 03 25 pm

it is pretty lame to not fix the #1 package in NPM for slugs, even having the reserved name slug as its package name... this is not how our community should function. So when someone new comes to the community, they have to look at 5 different packages all doing the same thing? Why doesn't everyone just fork koa and express and rename them a hundred times for little use cases?

niftylettuce commented 8 years ago

I am deprecating and removing my slug-rfc package from NPM and just going to use speakingurl. I suggest that @dodo find contributors and be willing to accept contributors next time. Thanks @pid for your work there, nice backup.

Zertz commented 8 years ago

If that works for you, then by all means go for it :-)

davidgilbertson commented 8 years ago

@niftylettuce what I meant to say is that when three packages all have the functionality that I want, and one has orders of magnitude more downloads, I'll pick that one.