{"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","tarball":"http://registry-npm.ywwl.com/ppost/download/ppost-0.1.2.tgz","integrity":"sha512-SzIEjyhSo5nrcufLDms1ypflymOovxv9XIUKIyA+L9uTvISml/Dg62COkXwcr2JgbJxueJV9iW5mX3gJldkWmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXki1p5EzqIKGCXVhnvtb7IuvvhO74cZaLipgfjNahYAiEAqJAyoiyWjem2N39lqN2qzKcDX00Gb5g8UDKgeslu5XQ="}],"size":3611,"noattachment":false,"key":"/ppost/-/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":{},"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  ","publish_time":1492429938330,"_cnpm_publish_time":1492429938330,"dist-tags":{"latest":"0.3.0"}}