You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.log(`New contact was ${success ?'saved':'not saved'}.`)
128
160
```
129
161
130
-
This method will return `false` if access to Contacts has not been granted.
131
-
132
162
### contacts.deleteContact(name)
133
163
134
164
*`name` String (required) - The first, last, or full name of a contact.
@@ -140,15 +170,17 @@ Deletes a contact to the user's contacts database.
140
170
If a contact's full name is 'Shelley Vohr', I could pass 'Shelley', 'Vohr', or 'Shelley Vohr' as `name`.
141
171
However, you should take care to specify `name` to such a degree that you can be confident the first contact to be returned from a predicate search is the contact you intend to delete.
142
172
173
+
This method will return `false` if access to Contacts has not been granted.
174
+
175
+
Example:
176
+
143
177
```js
144
178
constname='Jonathan Appleseed'
145
179
constdeleted=contacts.deleteContact(name)
146
180
147
181
console.log(`Contact ${name} was ${deleted ?'deleted':'not deleted'}.`)
148
182
```
149
183
150
-
This method will return `false` if access to Contacts has not been granted.
151
-
152
184
### contacts.updateContact(contact)
153
185
154
186
*`contact` Object
@@ -165,6 +197,10 @@ Updates a contact to the user's contacts database.
165
197
166
198
You should take care to specify parameters to the `contact` object to such a degree that you can be confident the first contact to be returned from a predicate search is the contact you intend to update.
167
199
200
+
This method will return `false` if access to Contacts has not been granted.
0 commit comments