Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lvjiaxuan/cb-promisify
将回调函数转为promise实例
https://github.com/lvjiaxuan/cb-promisify
Last synced: about 1 month ago
JSON representation
将回调函数转为promise实例
- Host: GitHub
- URL: https://github.com/lvjiaxuan/cb-promisify
- Owner: lvjiaxuan
- License: mit
- Created: 2019-09-27T10:51:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T18:45:03.000Z (about 2 years ago)
- Last Synced: 2023-03-02T22:56:17.533Z (almost 2 years ago)
- Language: JavaScript
- Size: 37.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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))
```