Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@giuliandrimba
Created September 19, 2015 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuliandrimba/7d8ffc3ec42feaec4dda to your computer and use it in GitHub Desktop.
Save giuliandrimba/7d8ffc3ec42feaec4dda to your computer and use it in GitHub Desktop.
_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