Created
September 19, 2015 20:26
-
-
Save giuliandrimba/7d8ffc3ec42feaec4dda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_get_images: (data, imgs=[])-> | |
for prop, val of data | |
if /(jpg|png|gif)$/.test(data[prop]) | |
imgs.push data[prop] | |
if Array.isArray(data[prop]) | |
for c in data[prop] | |
@_get_images c, imgs | |
return imgs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment