aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/md/docs/0xjs/0.0.1/async.md
diff options
context:
space:
mode:
authorHsuan Lee <boczeratul@gmail.com>2019-03-06 17:46:50 +0800
committerHsuan Lee <boczeratul@gmail.com>2019-03-06 17:46:50 +0800
commit35703539d0f2b4ddb3b11d0de8c9634af59ab71f (patch)
treeae3731221dbbb3a6fa40060a8d916cfd3f738289 /packages/website/md/docs/0xjs/0.0.1/async.md
parent92a1fde5b1ecd81b07cdb5bf0c9c1cd3544799db (diff)
downloaddexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.gz
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.bz2
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.lz
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.xz
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.tar.zst
dexon-0x-contracts-35703539d0f2b4ddb3b11d0de8c9634af59ab71f.zip
Deploy @dexon-foundation/0x.jsstable
Diffstat (limited to 'packages/website/md/docs/0xjs/0.0.1/async.md')
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/async.md26
1 files changed, 0 insertions, 26 deletions
diff --git a/packages/website/md/docs/0xjs/0.0.1/async.md b/packages/website/md/docs/0xjs/0.0.1/async.md
deleted file mode 100644
index 8abaef331..000000000
--- a/packages/website/md/docs/0xjs/0.0.1/async.md
+++ /dev/null
@@ -1,26 +0,0 @@
-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):_
-
-```javascript
-try {
- var availableAddresses = await zeroEx.getAvailableAddressesAsync();
-} catch (error) {
- console.log('Caught error: ', error);
-}
-```
-
-_Promise syntax:_
-
-```javascript
-zeroEx
- .getAvailableAddressesAsync()
- .then(function(availableAddresses) {
- console.log(availableAddresses);
- })
- .catch(function(error) {
- console.log('Caught error: ', error);
- });
-```
-
-As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.