os-x-contacts
v2.0.0
Published
Query all macOS Address Book contacts.
Downloads
7
Maintainers
Readme
os-x-contacts
Query all macOS Address Book contacts. Uses contacts-cli
under the hood.
Installing
npm install os-x-contacts
Usage
Returns a readable stream in object mode.
import {readContacts} from 'os-x-contacts'
for await (contact of contacts()) {
console.log(contact)
}
{
lastName: 'Appleseed', firstName: 'John',
phones: [ { label: 'mobile', value: '+49123456789' } ],
emails: [ { label: 'home', value: '[email protected]' } ]
}
{
lastName: 'Appleseed', firstName: 'Jane',
phones: [ { label: 'mobile', value: '+49123456789' } ],
emails: [ { label: 'home', value: '[email protected]' } ]
}
Contributing
If you have a question or need support using os-x-contacts
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, use the issues page.