{"bugs":{"url":"https://github.com/ethereum/web3.js/issues"},"dist":{"shasum":"430653a9c0ae4e562eafaf2f263e2ef448f907ef","tarball":"https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4-dev.0.tgz","fileCount":6,"integrity":"sha512-y2f5BLzUxlhYxzPOyiID91oxdV/zPFSdMUdN+YDlep34UWxEAQYxVKM8VrYMv1ebv6/qGWbHCI+wGnXkkkpfdQ==","signatures":[{"sig":"MEYCIQCgFkISEANaQxrIjuP1HRWI4RJcI/lXZn2/Qvobh0sKrQIhAMfg4WMr+r4DRmILWusy+zeLNDH+JbjM35kUOYWNufrf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6781},"main":"lib/index.js","name":"web3-core-promievent","readme":"# web3-core-promievent\n\n[![NPM Package][npm-image]][npm-url]\n\nThis is a sub-package of [web3.js][repo].\n\nThis is the PromiEvent package used to return a EventEmitter mixed with a Promise to allow multiple final states as well as chaining.\n\nPlease read the [documentation][docs] for more.\n\n## Installation\n\nYou can install the package either using [NPM](https://www.npmjs.com/package/web3-core-promievent) or using [Yarn](https://yarnpkg.com/package/web3-core-promievent)\n\n### Using NPM\n\n```bash\nnpm install web3-core-promievent\n```\n\n### Using Yarn\n\n```bash\nyarn add web3-core-promievent\n```\n\n## Usage\n\n```js\nconst Web3PromiEvent = require('web3-core-promievent');\n\nconst myFunc = function(){\n    const promiEvent = Web3PromiEvent();\n    \n    setTimeout(function() {\n        promiEvent.eventEmitter.emit('done', 'Hello!');\n        promiEvent.resolve('Hello!');\n    }, 10);\n    \n    return promiEvent.eventEmitter;\n};\n\n// and run it\nmyFunc()\n.on('done', console.log)\n.then(console.log);\n```\n\n[docs]: http://web3js.readthedocs.io/en/1.0/\n[repo]: https://github.com/ethereum/web3.js\n[npm-image]: https://img.shields.io/npm/v/web3-core-promievent.svg\n[npm-url]: https://npmjs.org/package/web3-core-promievent\n","engines":{"node":">=8.0.0"},"gitHead":"5b1b9d7c816ca75a2b5e587b57206116d60171f7","license":"LGPL-3.0","scripts":{"compile":"tsc -b tsconfig.json"},"_npmUser":{"name":"jdevcs","email":"junaid@chainsafe.io"},"homepage":"https://github.com/ethereum/web3.js/tree/1.x#readme","repository":{"url":"git+https://github.com/ethereum/web3.js.git#1.x","type":"git"},"_npmVersion":"lerna/6.6.2/node@v18.16.0+x64 (darwin)","description":"This package extends the EventEmitter with the Promise class to allow chaining as well as multiple final states of a function.","directories":{},"maintainers":[{"name":"luu-alex","email":"alex.luu@mail.utoronto.ca"},{"name":"mpetrunic","email":"marin.petrunic@gmail.com"},{"name":"jdevcs","email":"junaid@chainsafe.io"},{"name":"gregthegreek","email":"gregorymarkou@gmail.com"}],"_nodeVersion":"18.16.0","dependencies":{"eventemitter3":"4.0.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/web3-core-promievent_1.10.4-dev.0_1706723018467_0.5668831817691813","host":"s3://npm-registry-packages"},"_id":"web3-core-promievent@1.10.4-dev.0","version":"1.10.4-dev.0"}