PatrickJS / angular-md5

md5 for Angular.js and Gravatar filter
MIT License
132 stars 55 forks source link

Why the lib does a toLowerCase() over the input text? #13

Open JoniJnm opened 8 years ago

JoniJnm commented 8 years ago

Why?

rquadling commented 8 years ago

I assume you are referring to https://github.com/gdi2290/angular-md5/blob/master/lib/filters/md5.js#L6

rquadling commented 8 years ago

By the look of things, this is a cut'n'paste typo. The Gravatar filter uses strToLower to match the Gravatar API requirement : https://en.gravatar.com/site/implement/hash/

And as these filters were all added in the same request, I'm guessing at a cut'n'paste error.

rquadling commented 8 years ago

I'm not the project owner/collaborator, so will have to wait to see what @gdi2290 has to say on the matter.

I don't know how to do tests on this without building an entire app. So, if anyone reading this does know, please can you add a PR that actually runs some tests!

JoniJnm commented 8 years ago

Why there is a file called gravatar.js in this proyect? :S

rquadling commented 8 years ago

Good question. Most likely, the author needed it for a project.