Created
July 19, 2010 11:59
-
-
Save vjnrv/481311 to your computer and use it in GitHub Desktop.
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
/** | |
* Faz a comparação entre a lista de friends antiga e a nova. | |
* Se algum item da lista antiga não estiver na nova é Unfollow! | |
* @return unfollows {Array} | |
*/ | |
function unfollowCheck( friendsOld, friendsNew ) | |
{ | |
if( friendsOld ) | |
{ | |
var unfollows = []; | |
for( var i = 0, n = 0, item; item = friendsOld[i]; i++ ) | |
{ | |
if( !inArray( friendsNew, item ) ) | |
{ | |
unfollows[n] = item; | |
n++; | |
} | |
} | |
return unfollows; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment