{"name":"pedding","version":"2.0.1","description":"Just pending for callback.","repository":{"type":"git","url":"git://github.com/node-modules/pedding.git"},"keywords":["pedding","pending","callback"],"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","engines":{"node":">= 18.19.0"},"devDependencies":{"@arethetypeswrong/cli":"^0.17.1","@eggjs/tsconfig":"1","@types/node":"22","@types/mocha":"10","egg-bin":"6","eslint":"8","eslint-config-egg":"14","tshy":"3","tshy-after":"1","typescript":"5"},"scripts":{"lint":"eslint --cache src test --ext .ts","pretest":"npm run lint -- --fix && npm run prepublishOnly","test":"egg-bin test","preci":"npm run lint && npm run prepublishOnly && attw --pack","ci":"egg-bin cov","prepublishOnly":"tshy && tshy-after"},"type":"module","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/commonjs/index.d.ts","default":"./dist/commonjs/index.js"}},"./package.json":"./package.json"},"types":"./dist/commonjs/index.d.ts","main":"./dist/commonjs/index.js","module":"./dist/esm/index.js","_id":"pedding@2.0.1","gitHead":"d6143dac9140537f4f2a49739502f027ab7a4721","bugs":{"url":"https://github.com/node-modules/pedding/issues"},"homepage":"https://github.com/node-modules/pedding#readme","_nodeVersion":"18.20.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-uxQ88Bwwz2ZRXIfgZ+5CCdWcmbsQJJ03itU1/ykLQ960AREBX+chas7a3USCIX3l7JmvYMRpjqipSpiTo7R+fA==","shasum":"fe9b703d82389a85c38f79b00edbc02395eb7534","tarball":"http://registry-npm.ywwl.com/pedding/download/pedding-2.0.1.tgz","fileCount":11,"unpackedSize":13202,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pedding@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTzqbl7IPdvsfcRBnP2eVJWlsk1JvaSmrrElPoR4JcyAiEA4i/NeHxxlKOrtvfCBzw0YxWnZr6f+dkwNuz0EUilWHU="}],"size":4205,"noattachment":false,"key":"/pedding/-/pedding-2.0.1.tgz"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"directories":{},"maintainers":[{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pedding_2.0.1_1735732107976_0.6399343555581709"},"_hasShrinkwrap":false,"readme":"# pedding\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/node-modules/pedding/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/pedding/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n[![Node.js Version](https://img.shields.io/node/v/pedding.svg?style=flat)](https://nodejs.org/en/download/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)\n\n[npm-image]: https://img.shields.io/npm/v/pedding.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/pedding\n[codecov-image]: https://codecov.io/github/node-modules/pedding/coverage.svg?branch=master\n[codecov-url]: https://codecov.io/github/node-modules/pedding?branch=master\n[download-image]: https://img.shields.io/npm/dm/pedding.svg?style=flat-square\n[download-url]: https://npmjs.org/package/pedding\n\nUseful tools for unit test: Just pending for callback.\n\n## Installation\n\n### Node.js\n\n```bash\nnpm install pedding\n```\n\n## Usage\n\nCommonJS\n\n```js\nconst { pending } = require('pedding');\n\nit('should request two resources', done => {\n  done = pending(2, done);\n  http.get('http://fengmk2.github.com', res => {\n    done();\n  });\n  http.get('http://www.taobao.com', res => {\n    done();\n  });\n});\n```\n\nESM and TypeScript\n\n```ts\nimport { pending } from 'pedding';\n\nit('should request two resources', done => {\n  done = pending(2, done);\n  http.get('http://fengmk2.github.com', res => {\n    done();\n  });\n  http.get('http://www.taobao.com', res => {\n    done();\n  });\n});\n```\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=node-modules/pedding)](https://github.com/node-modules/pedding/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","publish_time":1735732108147,"_cnpm_publish_time":1735732108147,"dist-tags":{"latest":"2.0.1"}}