os-x-contacts

2.0.0 • Public • Published

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.

Package Sidebar

Install

npm i os-x-contacts

Weekly Downloads

2

Version

2.0.0

License

ISC

Unpacked Size

7.67 MB

Total Files

6

Last publish

Collaborators

  • derhuerst