Closed pmcelhaney closed 9 years ago
Conversation on Twitter that led to this request:
Hi there! This sounds good. Open Source for the win!
I created this plugin because I needed the functionality for a project with Bower support and I wanted to get to known the jQuery plugin development stack with something usefull. Most of the other snippets out there converted the german äöü incorrectly (So does yours at the moment as far as I am concerned ;) ).
The basic idea seems to be the same - probably you script was one of the few I reviewed at the time. I believe missing the slugFunc in the settings would be a regression for your users - so this should be one of the things to be merged.
Great. I've logged three features that I think need to be added before I can point my users here. Should be pretty simple.
I have tinkered with the idea to separate the concerns DOM Manipulation (jquery plugin) and the "slugifying" by integrating https://github.com/pid/speakingurl. The library already supports the #6 lang attribute feature and many more features. In my opinion this feels better than copying the code and I introduce own bugs.
I pushed the changes to the master branch for testing and discussion (probably should have created a separate branch). I have written some tests for the lang attribute feature, introduced a slugFunc function and updated the demo page.
I am not quite sure if I got the idea of the slugFunc pattern you created. I just hacked something and it worked :S ...
Oh, wow, SpeakingURL is cool! Yes, that's a great idea to reuse open source code. I've updated the readme on my version to point people here.
:+1:
I'm the author of probably the most popular jQuery slugify plugin on Github.
https://github.com/pmcelhaney/jQuery-Slugify-Plugin
It has some features that this one doesn't. And it has better i18n support thanks to many community contributions over the years.
But it lacks unit tests and isn't registered in Bower.
Rather than creating a competing Bower component, I would like to propose we study the differences between the two plugins, and port as many features as possible from mine to yours. Once that's done I'll "retire" the old project. I'll update the readme and point everyone here instead.
Sound good?