Created
February 10, 2014 13:30
-
-
Save stevenschobert/8915965 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
// 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