{"_id":"ppost","_rev":"479715","name":"ppost","description":"A simple central event emitter for electron","dist-tags":{"latest":"0.3.0"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"time":{"modified":"2021-08-05T09:31:30.000Z","created":"2017-04-14T16:42:56.857Z","0.3.0":"2017-04-22T12:22:55.088Z","0.2.0":"2017-04-17T22:05:01.369Z","0.1.2":"2017-04-17T11:52:18.330Z","0.1.1":"2017-04-16T14:34:24.451Z","0.1.0":"2017-04-16T14:01:30.210Z","0.0.1":"2017-04-14T16:42:56.857Z"},"users":{"monsterkodi":true},"author":{"name":"jarends"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"versions":{"0.3.0":{"name":"ppost","version":"0.3.0","description":"A simple central event emitter for electron","main":"./js/ppost.js","scripts":{"start":"coffee -c -w -o ./js ./coffee"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"keywords":["events","emitter","electron","ipc","main","BrowserWindow"],"author":{"name":"jarends"},"license":"Unlicense","bugs":{"url":"https://github.com/jarends/ppost/issues"},"homepage":"https://github.com/jarends/ppost#readme","gitHead":"f05c4060d7cc5e4f52afb9e12f15afcd26b0f802","_id":"ppost@0.3.0","_shasum":"a5786b5d55cd7a7665abec8509ec6c6af38b56fd","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jarends","email":"joa@nettrek.de"},"dist":{"shasum":"a5786b5d55cd7a7665abec8509ec6c6af38b56fd","size":3685,"noattachment":false,"key":"/ppost/-/ppost-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ppost/download/ppost-0.3.0.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ppost-0.3.0.tgz_1492863773797_0.5968833989463747"},"directories":{},"publish_time":1492863775088,"_cnpm_publish_time":1492863775088,"_hasShrinkwrap":false},"0.2.0":{"name":"ppost","version":"0.2.0","description":"A simple central event emitter for electron","main":"./js/ppost.js","scripts":{"start":"coffee -c -w -o ./js ./coffee"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"keywords":["events","emitter","electron","ipc","main","BrowserWindow"],"author":{"name":"jarends"},"license":"Unlicense","bugs":{"url":"https://github.com/jarends/ppost/issues"},"homepage":"https://github.com/jarends/ppost#readme","gitHead":"ae62589071eecef3017b17e9358513b260f2b485","_id":"ppost@0.2.0","_shasum":"d4de606f133952cfac6c31a1ac9146edce2f8869","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jarends","email":"joa@nettrek.de"},"dist":{"shasum":"d4de606f133952cfac6c31a1ac9146edce2f8869","size":3640,"noattachment":false,"key":"/ppost/-/ppost-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ppost/download/ppost-0.2.0.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ppost-0.2.0.tgz_1492466699434_0.851340965135023"},"directories":{},"publish_time":1492466701369,"_hasShrinkwrap":false,"_cnpm_publish_time":1492466701369},"0.1.2":{"name":"ppost","version":"0.1.2","description":"A simple central event emitter for electron","main":"./js/ppost.js","scripts":{"start":"coffee -c -w -o ./js ./coffee"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"keywords":["events","emitter","electron","ipc","main","BrowserWindow"],"author":{"name":"jarends"},"license":"Unlicense","bugs":{"url":"https://github.com/jarends/ppost/issues"},"homepage":"https://github.com/jarends/ppost#readme","gitHead":"34c59cf8099b0c9e9cb437cb452381154f452fde","_id":"ppost@0.1.2","_shasum":"4281b1ed9788676e531a8f80b63d65860feeee52","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jarends","email":"joa@nettrek.de"},"dist":{"shasum":"4281b1ed9788676e531a8f80b63d65860feeee52","size":3611,"noattachment":false,"key":"/ppost/-/ppost-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/ppost/download/ppost-0.1.2.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ppost-0.1.2.tgz_1492429937740_0.5850578732788563"},"directories":{},"publish_time":1492429938330,"_cnpm_publish_time":1492429938330,"_hasShrinkwrap":false},"0.1.1":{"name":"ppost","version":"0.1.1","description":"A simple central event emitter for electron","main":"./js/ppost.js","scripts":{"start":"coffee -c -w -o ./js ./coffee"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"keywords":["events","emitter","electron","ipc","main","BrowserWindow"],"author":{"name":"jarends"},"license":"Unlicense","bugs":{"url":"https://github.com/jarends/ppost/issues"},"homepage":"https://github.com/jarends/ppost#readme","gitHead":"052e8119e869482755b01b4b2b0d0d31e9f11294","_id":"ppost@0.1.1","_shasum":"c1113c0e55019d9dc67c7a096477b068508c116a","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jarends","email":"joa@nettrek.de"},"dist":{"shasum":"c1113c0e55019d9dc67c7a096477b068508c116a","size":3485,"noattachment":false,"key":"/ppost/-/ppost-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ppost/download/ppost-0.1.1.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ppost-0.1.1.tgz_1492353262600_0.4988976325839758"},"directories":{},"publish_time":1492353264451,"_hasShrinkwrap":false,"_cnpm_publish_time":1492353264451},"0.1.0":{"name":"ppost","version":"0.1.0","description":"A simple central event emitter for electron, which can also post messages from main to webcontents or from webcontents to nain or other webcontents.","main":"./js/ppost.js","scripts":{"start":"coffee -c -w -o ./js ./coffee"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"keywords":["events","emitter","electron","main","webcontents"],"author":{"name":"jarends"},"license":"Unlicense","bugs":{"url":"https://github.com/jarends/ppost/issues"},"homepage":"https://github.com/jarends/ppost#readme","dependencies":{"kxk":"^0.10.2"},"gitHead":"f774f8c5f62de66c777a1d3e2923161f3f382502","_id":"ppost@0.1.0","_shasum":"f25482ac184690e8fb9d197275eee5baab955fb9","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jarends","email":"joa@nettrek.de"},"dist":{"shasum":"f25482ac184690e8fb9d197275eee5baab955fb9","size":3560,"noattachment":false,"key":"/ppost/-/ppost-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/ppost/download/ppost-0.1.0.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ppost-0.1.0.tgz_1492351288114_0.31256516743451357"},"directories":{},"publish_time":1492351290210,"_hasShrinkwrap":false,"_cnpm_publish_time":1492351290210},"0.0.1":{"name":"ppost","version":"0.0.1","description":"A simple central event emitter for electron, which can also post messages from main to webcontents or from webcontents to nain or other webcontents.","main":"./js/ppost.js","scripts":{"start":"coffee -c -w -o ./js ./coffee"},"repository":{"type":"git","url":"git+https://github.com/jarends/ppost.git"},"keywords":["events","emitter","electron","main","webcontents"],"author":{"name":"jarends"},"license":"Unlicense","bugs":{"url":"https://github.com/jarends/ppost/issues"},"homepage":"https://github.com/jarends/ppost#readme","gitHead":"925df4a6275ca5578793d45d07f43820d21a8428","_id":"ppost@0.0.1","_shasum":"af63b8b86fda00725be138502e6d2193e9b47124","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"jarends","email":"joa@nettrek.de"},"dist":{"shasum":"af63b8b86fda00725be138502e6d2193e9b47124","size":3318,"noattachment":false,"key":"/ppost/-/ppost-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/ppost/download/ppost-0.0.1.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"},{"name":"monsterkodi","email":"monsterkodi@gmx.net"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ppost-0.0.1.tgz_1492188174854_0.9669808140024543"},"directories":{},"publish_time":1492188176857,"_hasShrinkwrap":false,"_cnpm_publish_time":1492188176857}},"readme":"# ppost\n\nA simple central event emitter for electron, which can post messages via ipc to the main process or other windows.\n  \n**Usage in renderer process**\n```coffee\n      \n    ppost = require 'ppost'\n    \n    # emit in this window (ppost extends event)\n    ppost.emit 'event', args...\n\n    # emit in process of window with id\n    ppost.toWin id, 'event', args...\n    \n    # emit in all processes\n    ppost.toAll 'event', args...\n    \n    # emit in all other windows processes and the main process, but not in this one\n    ppost.toOthers 'event', args...\n    \n    # emit in main process only\n    ppost.toMain 'event', args...\n    \n    # emit in all other window processes, but not in this one\n    ppost.toOtherWins 'event', args...\n    \n    # emit in all window processes, including this one, but not in main\n    ppost.toWins 'event', args...\n```  \n  \n**Usage in main process**\n```coffee\n\n    ppost = require 'ppost'\n\n    # emit in main process only\n    ppost.toMain 'event', args... \n    # or \n    ppost.emit 'event', args...\n    \n    # emit in all processes\n    ppost.toAll 'event', args...\n    \n    # emit in process of window with id\n    ppost.toWin id, 'event', args...\n    \n    # emit in all window processes\n    ppost.toAllWins 'event', args...    \n```\n\n**Synchronous ipc**\n\nin window: get value synchronously from main process\n\n```coffee\n    result = ppost.get 'something', args...\n```\n\nin main: add a callback for the `get` method\n\n```coffee    \n    ppost.onGet 'something', (args...) -> return something\n```\n\n<br>  \n<br>      \nEnjoy!\n<br>  \n<br>  \n\n### License    \n   \nppost is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.\n  ","_attachments":{},"homepage":"https://github.com/jarends/ppost#readme","bugs":{"url":"https://github.com/jarends/ppost/issues"},"license":"Unlicense"}