{"_id":"@danielsmilo/web3corepromieventdaniel","_rev":"1-f4c47420db0a14db5edc664207c51198","name":"@danielsmilo/web3corepromieventdaniel","dist-tags":{"latest":"1.0.0-beta.42"},"versions":{"1.0.0-beta.42":{"name":"@danielsmilo/web3corepromieventdaniel","namespace":"ethereum","version":"1.0.0-beta.42","description":"This package extends eventEmitters with promises to allow chaining as well as multiple final states of a function.","repository":{"type":"git","url":"https://github.com/ethereum/web3.js/tree/master/packages/web3-core-promievent"},"license":"LGPL-3.0","main":"src/index.js","dependencies":{"any-promise":"1.3.0","eventemitter3":"1.1.1"},"_id":"@danielsmilo/web3corepromieventdaniel@1.0.0-beta.42","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"danielsmilo","email":"daniel@smilo.io"},"dist":{"integrity":"sha512-zNVyd/0vr4TVoFoVRyuEgCr5FgY6mTduvXRdDQPwFbbNqWkiRpKKEMFGGNnTLGYWPToDQxAKyVQId43o0i0tow==","shasum":"da3f6e97e0088d6e37a681221e5c12e63812f101","tarball":"https://registry.npmjs.org/@danielsmilo/web3corepromieventdaniel/-/web3corepromieventdaniel-1.0.0-beta.42.tgz","fileCount":6,"unpackedSize":7878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb7g+CRA9TVsSAnZWagAAMsgP/1N0i99UwH4OZr0mhLWj\nRGL0QLZV3NyE+6biHD9E60r4HZjPCG6Xv70ygD6cKJfXe9lz46vXehdMuJra\nx2bW9GEM6HKOsdbOWPd2EdIeNr5Dt4duL+XyDtTNmBb3NOKaVlnWxfcqf1ei\njPqHl7CMKcgwLci+n9CEouiN/m0/83BWhBXlFsN3NkfosPhjVyTeqn62amo/\nItx0QkSn1bAql9ifjOy2QkZxLo55JEgl/ldXXhI8Ipn54MWQXYCwiO1wj5h5\nGKHNcZVMBcHZ4DFBIHT1OacRKQ7Y5zmbUnZQa9uYS6zDJZQM2I2/F/Rm11wh\n5M07W8Tyqm/ROkKUmkm9Nx5WFuPrEkHOrvHUMxj/GB2rLTQ66a9Re8PJX5We\ntqEisFS9LuphuJo5tnj2UvCd20Zs3u19cOR3E25OAoJaab+/L4HBI90sl9kp\n74x4CkH0XjK1pSL8Yy9JyK1TZTbygCevM7ogbDtik7w4pzjKdfKa+RsGf7yL\n8LfEe/RnFIdMwN4EPhVAAG3MyWGAKd7J8ZEFvjlrM5W40xjKOi9zb+HY5GOS\nwz+Kf6q6mR2S1xNBETqanFwnSN91T06vwdbkDxt82jcVhZjC0asx3gPrpQ2R\nAxiuSF/6ijc5E3VnjNECSVyxsYkzJJ4s+qhas0nRwT3E5fi1OjDVbtytH/fV\n5F+0\r\n=pZIi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiGcZxtB8b20nEPEZJzgA5b7g8EYhRAlIduhtxJNiTZwIgCANe2tm5U6Ygmj7kd6L7hM5H2mAkfG+ho4xyWj1c5hA="}]},"maintainers":[{"name":"danielsmilo","email":"daniel@smilo.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/web3corepromieventdaniel_1.0.0-beta.42_1550825534080_0.05865507368894507"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-22T08:52:13.907Z","1.0.0-beta.42":"2019-02-22T08:52:14.306Z","modified":"2022-04-05T02:41:29.110Z"},"maintainers":[{"name":"danielsmilo","email":"daniel@smilo.io"}],"description":"This package extends eventEmitters with promises to allow chaining as well as multiple final states of a function.","repository":{"type":"git","url":"https://github.com/ethereum/web3.js/tree/master/packages/web3-core-promievent"},"license":"LGPL-3.0","readme":"# web3-core-promievent\n\nThis is a sub package of [web3.js][repo]\n\nThis is the PromiEvent package is used to return a EventEmitter mixed with a Promise to allow multiple final states as well as chaining.\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### In the Browser\n\nBuild running the following in the [web3.js][repo] repository:\n\n```bash\nnpm run-script build-all\n```\n\nThen include `dist/web3-core-promievent.js` in your html file.\nThis will expose the `Web3PromiEvent` object on the window object.\n\n\n## Usage\n\n```js\n// in node.js\nvar Web3PromiEvent = require('web3-core-promievent');\n\nvar myFunc = function(){\n    var 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\n// and run it\nmyFunc()\n.then(console.log);\n.on('done', console.log);\n```\n\n\n[docs]: http://web3js.readthedocs.io/en/1.0/\n[repo]: https://github.com/ethereum/web3.js\n\n\n","readmeFilename":"README.md"}