Created
January 12, 2014 05:32
-
-
Save sapher/8381345 to your computer and use it in GitHub Desktop.
Test with Underscore/Lodash if an object contains same keys as another array
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 array = ["email", "password", "username"]; | |
var search = ["email", "password"]; | |
console.log(_.every(search, _.partial(_.contains, array))); | |
//true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment