Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving slugify #6

Closed
wants to merge 2 commits into from
Closed

Conversation

ericzon
Copy link

@ericzon ericzon commented Nov 24, 2014

I've added a new filter:

var input = ÁÉÍÓÚáéíóúÀÈÌÒÙàèìòù;
var output1 = $filter('pmkr.removeDiacritics')(input); // AEIOUaeiouAEIOUaeiou

Combining with slugify:
var output2 = $filter('pmkr.slugify')(output1); // aeiouaeiouaeiouaeiou

@m59peacemaker
Copy link
Owner

@ericzon Good stuff! Do you keep up with substack? His code philosophy has obliterated my thinking in some really good ways. I recommend extracting your stripDiacritics function out from anything related to Angular and putting it out on npm as its own module, then require/import it into your angular code. Browserify is awesome.

I'm mostly abandoning this repository, as it all needs to be approached with the npm/browserify/module mentality. I recommend that to you - so you'll have a repository for your stripDiacritics function, and then I'd just make a simple Angular filter wrapper for it in your project. Angular 2 will work more intuitively with all of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants