Created
April 14, 2012 17:49
-
-
Save skbailey/2386224 to your computer and use it in GitHub Desktop.
Find out whether an array is a subset of 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
Array.property.subset = function(arr){ return _.all(arr, function(value){ return this.indexOf(value) !== -1; }, this); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment