Skip to content

Instantly share code, notes, and snippets.

@stevenschobert
Created February 10, 2014 13:30
Show Gist options
  • Save stevenschobert/8915965 to your computer and use it in GitHub Desktop.
Save stevenschobert/8915965 to your computer and use it in GitHub Desktop.
// note: if you don't need IE8 support, you can just do
// return image.tags.indexOf('TAGNAME') !== -1;
filter: function(image) {
var foundTag = false, tags = image.tags;
for(var i=0,len=tags.length; i<len && !foundTag; i++) {
if (tags[i] === 'THE_TAG_NAME') foundTag = true;
};
return foundTag;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment