{"name":"pedding","version":"2.0.0","keywords":["pedding","pending","callback"],"author":{"name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"pedding@2.0.0","maintainers":[{"name":"dead-horse","email":"dead_horse@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"}],"homepage":"https://github.com/node-modules/pedding#readme","bugs":{"url":"https://github.com/node-modules/pedding/issues"},"dist":{"shasum":"782e061e1441e2e021d2d2b35c5f21c69ff162bb","tarball":"http://registry-npm.ywwl.com/pedding/download/pedding-2.0.0.tgz","fileCount":11,"integrity":"sha512-v1V68/zOSLI0sYULPqDYFEyIVGcTcEN5lZOZOZtluBt6UsvmABKhP03saqs9VnL0wbf+8Qrm/kBfnRCM3W5rEA==","signatures":[{"sig":"MEUCIHSzVYPjNZ7jSdGvwfxqyLzHZB24Qn9HMLObpCTrwsT9AiEA87DPi1ckRYX18wIl381WRd3LZlZEaazqFeWYp5YBPSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/pedding@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":12678,"size":4008,"noattachment":false,"key":"/pedding/-/pedding-2.0.0.tgz"},"main":"./dist/commonjs/index.js","tshy":{"exports":{".":"./src/index.ts","./package.json":"./package.json"}},"type":"module","types":"./dist/commonjs/index.d.ts","module":"./dist/esm/index.js","engines":{"node":">= 18.19.0"},"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"},"gitHead":"132f38b0675c1ddb42d78bf7826abff1ba69443e","scripts":{"ci":"egg-bin cov","lint":"eslint --cache src test --ext .ts","test":"egg-bin test","preci":"npm run lint && npm run prepublishOnly && attw --pack","pretest":"npm run lint -- --fix && npm run prepublishOnly","prepublishOnly":"tshy && tshy-after"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/pedding.git","type":"git"},"_npmVersion":"10.8.2","description":"Just pending for callback.","directories":{},"_nodeVersion":"18.20.5","_hasShrinkwrap":false,"devDependencies":{"tshy":"3","eslint":"8","egg-bin":"6","tshy-after":"1","typescript":"5","@types/node":"22","@types/mocha":"10","@eggjs/tsconfig":"1","eslint-config-egg":"14","@arethetypeswrong/cli":"^0.17.1"},"_npmOperationalInternal":{"tmp":"tmp/pedding_2.0.0_1734852678691_0.6829611196382819","host":"s3://npm-registry-packages-npm-production"},"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":1734852678835,"_cnpm_publish_time":1734852678835,"dist-tags":{"latest":"2.0.1"}}