https://github.com/node-modules/pedding
Just pedding for callback.
https://github.com/node-modules/pedding
Last synced: 11 months ago
JSON representation
Just pedding for callback.
- Host: GitHub
- URL: https://github.com/node-modules/pedding
- Owner: node-modules
- License: mit
- Created: 2012-09-18T14:30:15.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2025-01-01T11:48:22.000Z (over 1 year ago)
- Last Synced: 2025-05-25T15:53:35.744Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 24.4 KB
- Stars: 12
- Watchers: 11
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pedding
[![NPM version][npm-image]][npm-url]
[](https://github.com/node-modules/pedding/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]
[](https://nodejs.org/en/download/)
[](https://makeapullrequest.com)
[npm-image]: https://img.shields.io/npm/v/pedding.svg?style=flat-square
[npm-url]: https://npmjs.org/package/pedding
[codecov-image]: https://codecov.io/github/node-modules/pedding/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/pedding?branch=master
[download-image]: https://img.shields.io/npm/dm/pedding.svg?style=flat-square
[download-url]: https://npmjs.org/package/pedding
Useful tools for unit test: Just pending for callback.
## Installation
### Node.js
```bash
npm install pedding
```
## Usage
CommonJS
```js
const { pending } = require('pedding');
it('should request two resources', done => {
done = pending(2, done);
http.get('http://fengmk2.github.com', res => {
done();
});
http.get('http://www.taobao.com', res => {
done();
});
});
```
ESM and TypeScript
```ts
import { pending } from 'pedding';
it('should request two resources', done => {
done = pending(2, done);
http.get('http://fengmk2.github.com', res => {
done();
});
http.get('http://www.taobao.com', res => {
done();
});
});
```
## License
[MIT](LICENSE)
## Contributors
[](https://github.com/node-modules/pedding/graphs/contributors)
Made with [contributors-img](https://contrib.rocks).