e-oj / grabity

Generate link previews from pages with Open Graph or Twitter Cards markup. Just grab it! 🎣
https://www.npmjs.com/package/grabity
MIT License
291 stars 15 forks source link

Improved favicon detection, updated README #6

Closed joshfarrant closed 5 years ago

joshfarrant commented 6 years ago

Added a few more checks to try to find favicons. Also updated the README to include information about favicons. (My local linter removed unnecessary whitespace from the README too, hence the diff on otherwise unchanged lines).

e-oj commented 6 years ago

Sorry it took me a while to get to this; I had a bunch of tasks to complete earlier.

Great job. I like how you're searching for other possible favicon sources. The only thing I would add is, we could use early returns or breaks in those find loops. Early returns would be preferable because then, we could just skip the remaining if statements all together. Make those changes and I'll merge your pr and publish the updates asap.

Thanks again for contributing.