From 922b633d33afe7a4acc64ce9179d011d118a138b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michae=CC=88l=20Villeneuve?= Date: Thu, 25 Jan 2018 10:10:19 +0100 Subject: [PATCH] Update readme with promises infos --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 58aec19..8db2f8b 100644 --- a/README.md +++ b/README.md @@ -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)); ``` \ No newline at end of file