Skip to content

Commit fd68dab

Browse files
authored
Merge pull request #458 from zhirzh/patch-1
fix syntax highlighting
2 parents 6f56ccb + 808bd5a commit fd68dab

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Ask questions on [stackoverflow](https://stackoverflow.com/questions/tagged/reac
66

77
## Usage
88
`getAll` is a database intensive process, and can take a long time to complete depending on the size of the contacts list. Because of this, it is recommended you access the `getAll` method before it is needed, and cache the results for future use.
9-
```es
9+
```js
1010
import Contacts from 'react-native-contacts';
1111

1212
Contacts.getAll((err, contacts) => {
@@ -20,7 +20,7 @@ See the full [API](#api) for more methods.
2020

2121
### Android permissions
2222
On android you must request permissions beforehand
23-
```es
23+
```js
2424
import { PermissionsAndroid } from 'react-native';
2525
import Contacts from 'react-native-contacts';
2626

@@ -194,7 +194,7 @@ callback <Function>
194194
```
195195

196196
## Example Contact Record
197-
```es
197+
```js
198198
{
199199
recordID: '6b2237ee0df85980',
200200
backTitle: '',
@@ -237,7 +237,7 @@ callback <Function>
237237

238238
## Adding Contacts
239239
Currently all fields from the contact record except for thumbnailPath are supported for writing
240-
```es
240+
```js
241241
var newPerson = {
242242
emailAddresses: [{
243243
label: "work",
@@ -255,7 +255,7 @@ Contacts.addContact(newPerson, (err) => {
255255

256256
## Open Contact Form
257257
Currently all fields from the contact record except for thumbnailPath are supported for writing
258-
```es
258+
```js
259259
var newPerson = {
260260
emailAddresses: [{
261261
label: "work",
@@ -273,7 +273,7 @@ You may want to edit the contact before saving it into your phone book. So using
273273

274274
## Updating Contacts
275275
Example
276-
```es
276+
```js
277277
Contacts.getAll((err, contacts) => {
278278
if (err) {
279279
throw err;
@@ -301,7 +301,7 @@ See https://github.com/rt2zz/react-native-contacts/issues/332#issuecomment-45567
301301

302302
## Delete Contacts
303303
You can delete a record using only it's recordID
304-
```es
304+
```js
305305
Contacts.deleteContact({recordID: 1}, (err, recordId) => {
306306
if (err) {
307307
throw err;
@@ -310,7 +310,7 @@ Contacts.deleteContact({recordID: 1}, (err, recordId) => {
310310
})
311311
```
312312
Or by passing the full contact object with a `recordID` field.
313-
```es
313+
```js
314314
Contacts.deleteContact(contact, (err, recordId) => {
315315
if (err) {
316316
throw err;
@@ -323,7 +323,7 @@ Contacts.deleteContact(contact, (err, recordId) => {
323323

324324
The thumbnailPath is the direct URI for the temp location of the contact's cropped thumbnail image.
325325

326-
```es
326+
```js
327327
<Image source={{uri: contact.thumbnailPath}} />
328328
```
329329

@@ -332,7 +332,7 @@ The thumbnailPath is the direct URI for the temp location of the contact's cropp
332332
`requestPermission` (callback) - request permission to access Contacts.
333333

334334
Usage as follows:
335-
```es
335+
```js
336336
Contacts.checkPermission((err, permission) => {
337337
if (err) throw err;
338338

0 commit comments

Comments
 (0)