diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-04 19:54:16 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-01-04 23:32:03 +0800 |
commit | c700046b7673a0f470c8d8abeec3cf873049a78a (patch) | |
tree | c7bdfc8e6d17d587f47ee23ef4a295ed192ae633 /packages/website/md/docs/0xjs/async.md | |
parent | 326a6b729fe6cf96f0b4787d84903282738b6863 (diff) | |
download | dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.tar dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.tar.gz dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.tar.bz2 dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.tar.lz dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.tar.xz dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.tar.zst dexon-0x-contracts-c700046b7673a0f470c8d8abeec3cf873049a78a.zip |
Apply prettify on json and md files
Diffstat (limited to 'packages/website/md/docs/0xjs/async.md')
-rw-r--r-- | packages/website/md/docs/0xjs/async.md | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/website/md/docs/0xjs/async.md b/packages/website/md/docs/0xjs/async.md index 63924c76c..8abaef331 100644 --- a/packages/website/md/docs/0xjs/async.md +++ b/packages/website/md/docs/0xjs/async.md @@ -1,6 +1,7 @@ 0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods. -*Async/await syntax (recommended):* +_Async/await syntax (recommended):_ + ```javascript try { var availableAddresses = await zeroEx.getAvailableAddressesAsync(); @@ -9,9 +10,11 @@ try { } ``` -*Promise syntax:* +_Promise syntax:_ + ```javascript -zeroEx.getAvailableAddressesAsync() +zeroEx + .getAvailableAddressesAsync() .then(function(availableAddresses) { console.log(availableAddresses); }) |