Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lvjiaxuan/cb-promisify

将回调函数转为promise实例
https://github.com/lvjiaxuan/cb-promisify

Last synced: about 1 month ago
JSON representation

将回调函数转为promise实例

Awesome Lists containing this project

README

        

# cb-promisify

将回调函数转换为promise的形式

## 示例

```javascript
const readdir = promisify(fs.readdir);

fsReaddirPro(workplace + 'images/')
.then(res => console.log(res))
.catch(err => console.log(err))
```