angular-md5 icon indicating copy to clipboard operation
angular-md5 copied to clipboard

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

Open JoniJnm opened this issue 9 years ago • 5 comments

Why?

JoniJnm avatar Oct 09 '16 20:10 JoniJnm

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

rquadling avatar Oct 10 '16 14:10 rquadling

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 avatar Oct 10 '16 14:10 rquadling

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!

rquadling avatar Oct 10 '16 14:10 rquadling

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

JoniJnm avatar Oct 10 '16 18:10 JoniJnm

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

rquadling avatar Oct 10 '16 20:10 rquadling