ebay_dapp

所属分类:区块链开发
开发工具:TypeScript
文件大小:55504KB
下载次数:0
上传日期:2022-01-09 15:40:18
上 传 者sh-1993
说明:  由以太坊智能合约驱动的去中心化ebay式市场。
(Decentralized ebay-like marketplace powered by Ethereum smart contracts.)

文件列表:
.angular-cli.json (1137, 2017-11-22)
.babelrc (25, 2017-11-22)
.editorconfig (245, 2017-11-22)
.eslintignore (129, 2017-11-22)
.eslintrc (308, 2017-11-22)
.travis.yml (130, 2017-11-22)
LICENSE (11357, 2017-11-22)
NOTICE (272, 2017-11-22)
box-img-lg.png (19859, 2017-11-22)
box-img-sm.png (7199, 2017-11-22)
build (0, 2017-11-22)
build\contracts (0, 2017-11-22)
build\contracts\EcommerceStore.json (122802, 2017-11-22)
build\contracts\Migrations.json (31819, 2017-11-22)
ci (0, 2017-11-22)
ci\build.sh (143, 2017-11-22)
ci\install-deps.sh (123, 2017-11-22)
contracts (0, 2017-11-22)
contracts\EcommerceStore.sol (1806, 2017-11-22)
contracts\Migrations.sol (515, 2017-11-22)
e2e (0, 2017-11-22)
e2e\app.e2e-spec.ts (300, 2017-11-22)
e2e\app.po.ts (266, 2017-11-22)
e2e\tsconfig.e2e.json (235, 2017-11-22)
karma.conf.js (1217, 2017-11-22)
migrations (0, 2017-11-22)
migrations\1_initial_migration.js (129, 2017-11-22)
migrations\2_deploy_contracts.js (143, 2017-11-22)
node_modules (0, 2017-11-22)
node_modules\.bin (0, 2017-11-22)
node_modules\.bin\_ts-node (23, 2017-11-22)
node_modules\.bin\acorn (18, 2017-11-22)
node_modules\.bin\ansi-html (26, 2017-11-22)
node_modules\.bin\babylon (25, 2017-11-22)
node_modules\.bin\browserslist (22, 2017-11-22)
node_modules\.bin\build-optimizer (61, 2017-11-22)
node_modules\.bin\cssesc (20, 2017-11-22)
node_modules\.bin\csso (16, 2017-11-22)
node_modules\.bin\errno (15, 2017-11-22)
... ...

[![Build Status](https://secure.travis-ci.org/kriskowal/q.svg?branch=master)](http://travis-ci.org/kriskowal/q) [![CDNJS](https://img.shields.io/cdnjs/v/q.js.svg)](https://cdnjs.com/libraries/q.js) Q logo If a function cannot return a value or throw an exception without blocking, it can return a promise instead. A promise is an object that represents the return value or the thrown exception that the function may eventually provide. A promise can also be used as a proxy for a [remote object][Q-Connection] to overcome latency. [Q-Connection]: https://github.com/kriskowal/q-connection On the first pass, promises can mitigate the “[Pyramid of Doom][POD]”: the situation where code marches to the right faster than it marches forward. [POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/ ```javascript step1(function (value1) { step2(value1, function(value2) { step3(value2, function(value3) { step4(value3, function(value4) { // Do something with value4 }); }); }); }); ``` With a promise library, you can flatten the pyramid. ```javascript Q.fcall(promisedStep1) .then(promisedStep2) .then(promisedStep3) .then(promisedStep4) .then(function (value4) { // Do something with value4 }) .catch(function (error) { // Handle any error from all above steps }) .done(); ``` With this approach, you also get implicit error propagation, just like `try`, `catch`, and `finally`. An error in `promisedStep1` will flow all the way to the `catch` function, where it’s caught and handled. (Here `promisedStepN` is a version of `stepN` that returns a promise.) The callback approach is called an “inversion of control”. A function that accepts a callback instead of a return value is saying, “Don’t call me, I’ll call you.”. Promises [un-invert][IOC] the inversion, cleanly separating the input arguments from control flow arguments. This simplifies the use and creation of API’s, particularly variadic, rest and spread arguments. [IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript ## Getting Started The Q module can be loaded as: - A ``