Skip to content

Instantly share code, notes, and snippets.

@skbailey
Created April 14, 2012 17:49
Show Gist options
  • Save skbailey/2386224 to your computer and use it in GitHub Desktop.
Save skbailey/2386224 to your computer and use it in GitHub Desktop.
Find out whether an array is a subset of another array
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