Last active
August 29, 2015 14:08
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
var directive = { | |
'li':{ | |
'animal<-animals':{ | |
'span.name':'animal.name' | |
}, | |
// at the same level of the <- loop declaration | |
// use the keyword: filter | |
filter:function(a){ | |
// if the name starts with "a" or "A", keep it, returns true | |
// otherwise, skip it, return false | |
return ( /^a/i ).test( a.item.name ); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment