Skip to content

Commit 3878f43

Browse files
committed
文档
1 parent 6a05860 commit 3878f43

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
# syncBack
2-
嗯,这个库可以避免代码出现回调套回调的`回调地狱(callback_hell)`.
3-
ps:有人愿意帮我翻译成英文版吗?
2+
* 嗯,这个库可以避免代码出现回调套回调的`回调地狱(callback_hell)`.
3+
* 有人愿意帮我翻译成英文版吗?
4+
5+
# 版本
6+
* 这是2.x版本
7+
* 1.x版本请点击[这里](https://github.com/lsby/syncBack/tree/cbfdf1d77efd921de681a9abe46670aa26f9eabf)
48

59
## 使用
6-
在一般函数前加`yield`,然后在回调函数上写`api.next`即可.
10+
1. 在异步函数前加`yield`
11+
2. 在回调函数上写`api.next`
712

813
## 例子
914
顺序执行异步函数:
@@ -65,5 +70,4 @@ sync(function* (api) {
6570
* 为什么不用$%^&*?
6671
* 对不起我错了...我还是喜欢这样的写法...
6772
* 还会更新吗?
68-
* 有bug会修复(如果有能力).
69-
* 至于要不要加类似`promise.all`的功能,之类的...我还没有想好调用形式...
73+
* 如果实际使用中不能满足需求的话就更新.

0 commit comments

Comments
 (0)