Created
January 29, 2015 09:50
-
-
Save oshanz/f1f470c0e946dc0b49c1 to your computer and use it in GitHub Desktop.
backbone viewHelper
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
sortMonths : function(months) { | |
return _.intersection(['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], months); | |
} | |
getUniqPluck : function(arg, useCache) { | |
if (useCache) { | |
return this[arg] = this[arg] || _.uniq(_.pluck(this.List, arg)).sort(); | |
} else { | |
return _.uniq(_.pluck(this.List, arg)); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment