Skip to content

Commit 80f6960

Browse files
LiranBridgeAR
authored andcommitted
add async await example
1 parent 1ef099c commit 80f6960

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ now *getAsync* is a promisified version of *client.get*:
7070
return getAsync('foo').then(function(res) {
7171
console.log(res); // => 'bar'
7272
});
73+
74+
// or using [async await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)
75+
async myFunc() {
76+
const res = await getAsync('foo');
77+
console.log(res);
78+
}
7379
```
7480

7581
#### Bluebird Promises

0 commit comments

Comments
 (0)