Created
December 20, 2013 19:07
-
-
Save tracend/8059783 to your computer and use it in GitHub Desktop.
inArray - Underscore mixin to find if a value exists in an array #cc #underscore
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
_.mixin({ | |
inArray: function(value, array){ | |
return array.indexOf(value) > -1; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment