Skip to content

Commit c7f6437

Browse files
author
Zhao
authored
rename function name to readFileThunk
这里使用 `readFileThunk` 更容易理解
1 parent 3b6848b commit c7f6437

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/async.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,12 +439,12 @@ while(!res.done){
439439
```javascript
440440
var fs = require('fs');
441441
var thunkify = require('thunkify');
442-
var readFile = thunkify(fs.readFile);
442+
var readFileThunk = thunkify(fs.readFile);
443443

444444
var gen = function* (){
445-
var r1 = yield readFile('/etc/fstab');
445+
var r1 = yield readFileThunk('/etc/fstab');
446446
console.log(r1.toString());
447-
var r2 = yield readFile('/etc/shells');
447+
var r2 = yield readFileThunk('/etc/shells');
448448
console.log(r2.toString());
449449
};
450450
```

0 commit comments

Comments
 (0)