Created
August 19, 2020 21:11
-
-
Save Sytten/9f8ab31257311b5bf4d9a6821b913915 to your computer and use it in GitHub Desktop.
contacts-filter
This file contains hidden or 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
const MY_CONTACTS_GROUP_REGEX = /http:\/\/www\.google\.com\/m8\/feeds\/groups\/.+\/base\/6/ | |
contacts = contacts.filter(contact => { | |
const groups = contact.gContact$groupMembershipInfo || [] | |
return groups.some(group => MY_CONTACTS_GROUP_REGEX.test(group.href)) | |
}) | |
contacts = contacts.slice(0, limit + 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment