Skip to content

Instantly share code, notes, and snippets.

@mrbobbybryant
Created November 17, 2015 01:27
Show Gist options
  • Select an option

  • Save mrbobbybryant/279db510bada0440a558 to your computer and use it in GitHub Desktop.

Select an option

Save mrbobbybryant/279db510bada0440a558 to your computer and use it in GitHub Desktop.
arrayDiff: function( current, selected ) {
return selected.filter( function(data) {
return current.indexOf(data) === -1;
} );
},
extractArrayValue: function( array, value ) {
return array.map( function(data) {
return data[value];
} );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment