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
/** | |
* intersectionObj | |
* Pass an array of objects to find the similar objects | |
* You may also pass a single prop as a string, or an array of props to ignore | |
* Returns an array of the items which intersected | |
* | |
* Usage example: | |
* var arr = [ { id:1, b:2, c:3 }, { id:2, b:3, c:4 }, { id:3, b:2, c:3 } ]; | |
* _.intersectionObj(arr, 'id'); | |
* » [ { id:1, b:2, c:3 }, { id:3, b:2, c:3 } ] |
OlderNewer