{"_id":"@binance-chain/web3-core-promievent","_rev":"1-f1d0b64108658761be3b97154ba44724","name":"@binance-chain/web3-core-promievent","dist-tags":{"latest":"1.6.1"},"versions":{"1.6.1":{"name":"@binance-chain/web3-core-promievent","version":"1.6.1","description":"This package extends the EventEmitter with the Promise class to allow chaining as well as multiple final states of a function.","repository":{"type":"git","url":"https://github.com/ethereum/web3.js/tree/1.x/packages/web3-core-promievent"},"license":"LGPL-3.0","engines":{"node":">=8.0.0"},"main":"lib/index.js","scripts":{"compile":"tsc -b tsconfig.json"},"dependencies":{"eventemitter3":"4.0.4"},"publishConfig":{"access":"public"},"gitHead":"3c49beac02dd35e175f8b30e4764c57a81a873dc","_id":"@binance-chain/web3-core-promievent@1.6.1","_nodeVersion":"16.6.1","_npmVersion":"lerna/3.22.1/node@v16.6.1+x64 (darwin)","dist":{"integrity":"sha512-E6p3SMULC1mjBk57JnnXUCFl551Ng5v3D0ZB8KdFUVUxjxoJTH7ZnRStU/AO9GcTBSqlGBC8mH33bt4s+sWE8g==","shasum":"7984ef0b296450f0d55c55471149e21d00664b7a","tarball":"https://registry.npmjs.org/@binance-chain/web3-core-promievent/-/web3-core-promievent-1.6.1.tgz","fileCount":6,"unpackedSize":7124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI6hfCRA9TVsSAnZWagAAoiAP/3VlGpeH9qV3UvSikasA\nwUjRP7tYNoDouhH/tLJAl6vFBgi8wy4hzik4UI0aCNdXY1LtXjy5jYUgK48x\nV2gahNCnhPloxtyQ/PqoX8v5Sw0FqI7UdBFrkY1rdng22cHrbm9AKvHip3PJ\nuBlr/6lFiV+o0KcJ2i0JXgXUDq42EQAgopWRttWvPEQEMEFQv3EmKSnDA3x4\nuez6wBWun/zy5QoM5FHOZk1YXg5XhX/Z5lBhJFruBR5/KWH5NurpJG7tmAaF\norhDszoNq45rI2oCjcQUuow4sfAAShgz9106WcOEWVWcuMw4SIgtGVl1oA7r\nik70tNPIxofuIP0wD8l3ji5uh4aTFPd4dcRgYuUm9zvx5eoVeU6984Vv7w8y\nmcEolmxOXEaa+JNyamRCSPbJVzAUTNHjc6ZA0UL08CC9ou2BHyv/JmvE7Lgk\nj6kHG/qqIjxJdCScRBiaTylFTw0gEU0tDfyTH2ItUBlqRuThd0g17wgykDDC\nzt87A99ugOZuAd5CoyH9a/pEI+uQqy+1JBoIJmrpkgVr0nynrOKQUsgDqIJi\nlThZ45icHXlb1jPdpdetoEzLVGzUKi4ZB4ZQGYmvbFD6HY+WD0dcUvjihThU\n+voEAHfeZ8rssiTDmcOs61bYnhRW0HnQR1o2wRVBlb8eCKtLrkRamT35Co1y\nUUzS\r\n=OBPl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZGaebriXYebRpc9HsvW0rZWCtXZVUyFZzY97H1de7gAiEA3FFM3Havz/+omeg3ru34prOiUSAgTwLSFSp40Wai/sE="}]},"_npmUser":{"name":"binance-chain-npm","email":"bit-fe-ci@binance.com"},"directories":{},"maintainers":[{"name":"binance-chain-npm","email":"bit-fe-ci@binance.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web3-core-promievent_1.6.1_1629726815197_0.8638758425358319"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-23T13:53:35.148Z","1.6.1":"2021-08-23T13:53:35.357Z","modified":"2022-04-04T18:52:22.661Z"},"maintainers":[{"name":"binance-chain-npm","email":"bit-fe-ci@binance.com"}],"description":"This package extends the EventEmitter with the Promise class to allow chaining as well as multiple final states of a function.","repository":{"type":"git","url":"https://github.com/ethereum/web3.js/tree/1.x/packages/web3-core-promievent"},"license":"LGPL-3.0","readme":"# web3-core-promievent\n\n[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-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\n### Node.js\n\n```bash\nnpm install 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[deps-image]: https://david-dm.org/ethereum/web3.js/1.x/status.svg?path=packages/web3-core-promievent\n[deps-url]: https://david-dm.org/ethereum/web3.js/1.x?path=packages/web3-core-promievent\n[deps-dev-image]: https://david-dm.org/ethereum/web3.js/1.x/dev-status.svg?path=packages/web3-core-promievent\n[deps-dev-url]: https://david-dm.org/ethereum/web3.js/1.x?type=dev&path=packages/web3-core-promievent\n","readmeFilename":"README.md"}