Javascript Array Intersect
1 2 Object.extend(Array.prototype, { 3 intersect: function(array){ 4 return this.findAll( function(token){ return array.include(token) } ); 5 } 6 });
12730 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
1 2 Object.extend(Array.prototype, { 3 intersect: function(array){ 4 return this.findAll( function(token){ return array.include(token) } ); 5 } 6 });