2.0.0 • Published 9 months ago

os-x-contacts v2.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
9 months ago

os-x-contacts

Query all macOS Address Book contacts. Uses contacts-cli under the hood.

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

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: 'john.appleseed@example.org' } ]
}
{
	lastName: 'Appleseed', firstName: 'Jane',
	phones: [ { label: 'mobile', value: '+49123456789' } ],
	emails: [ { label: 'home', value: 'jane.appleseed@example.org' } ]
}

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.