From ffd235165ebb701576ecec6c3cedbf21e2728ff7 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Mon, 21 Sep 2015 13:34:59 +0800 Subject: [PATCH] co: mention thenify --- co.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/co.md b/co.md index cf7db8497..7d75b524a 100644 --- a/co.md +++ b/co.md @@ -5,7 +5,7 @@ title: co [co]: https://github.com/tj/co [thunkify]: https://github.com/visionmedia/node-thunkify [unyield]: https://github.com/MatthewMueller/unyield -[promisify]: https://www.npmjs.com/package/promisify +[thenify]: https://www.npmjs.com/package/thenify [mz]: https://www.npmjs.com/package/mz [co] allows you to use generators to manage async flow. @@ -45,7 +45,7 @@ get(function (err, res) { ... }) ### Node callback → Thunk -Use [thunkify]. You can yield this. You can also use [promisify].func too. +Use [thunkify]. You can yield this. You can also use [thenify] too. ```js var readFile = thunkify(fs.readFile) @@ -57,7 +57,7 @@ co(function * () { ### Using Node.js API -Uze [mz]. You can also either [thunkify] or [promisify].func Node.js API. +Uze [mz] for async Node.js API. You can also either [thunkify] or [thenify] them instead. ```js var readFile = require('mz/fs').readFile