Skip to content

Commit

Permalink
Update readme with promises infos
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaël Villeneuve committed Jan 25, 2018
1 parent 2195e8d commit 922b633
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ or
```javascript
import ImgToBase64 from 'react-native-image-base64';

ImgToBase64.getBase64String('file://youfileurl', (err, base64string) => doSomethingWith(base64string));
ImgToBase64.getBase64String('file://youfileurl')
.then(base64String => doSomethingWith(base64String))
.catch(err => doSomethingWith(err));
```

0 comments on commit 922b633

Please sign in to comment.