https://github.com/afeiship/next-dd-promisfy
Promisfy for dingtalk.
https://github.com/afeiship/next-dd-promisfy
dd dingtalk next promisfy
Last synced: about 2 months ago
JSON representation
Promisfy for dingtalk.
- Host: GitHub
- URL: https://github.com/afeiship/next-dd-promisfy
- Owner: afeiship
- License: mit
- Created: 2020-06-14T05:53:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-21T01:36:54.000Z (over 5 years ago)
- Last Synced: 2025-03-11T07:41:24.524Z (over 1 year ago)
- Topics: dd, dingtalk, next, promisfy
- Language: JavaScript
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-dd-promisfy
> Promisfy for dingtalk.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```bash
npm install -S @jswork/next-dd-promisfy
```
## usage
```js
import '@jswork/next-dd-promisfy';
const getPhoneInfo = nx.ddPromisfy(dd.device.base.getPhoneInfo, { context: dd.device.base });
// call the promisfy function
getPhoneInfo()
.then(res=>{
console.log(res);
}).catch(err=>{
console.log(err);
});
```
## resources
- http://bluebirdjs.com/docs/api/promise.promisify.html
## license
Code released under [the MIT license](https://github.com/afeiship/next-dd-promisfy/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-dd-promisfy
[version-url]: https://npmjs.org/package/@jswork/next-dd-promisfy
[license-image]: https://img.shields.io/npm/l/@jswork/next-dd-promisfy
[license-url]: https://github.com/afeiship/next-dd-promisfy/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-dd-promisfy
[size-url]: https://github.com/afeiship/next-dd-promisfy/blob/master/dist/next-dd-promisfy.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-dd-promisfy
[download-url]: https://www.npmjs.com/package/@jswork/next-dd-promisfy