{"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","tarball":"http://registry-npm.ywwl.com/ppost/download/ppost-0.1.0.tgz","integrity":"sha512-Nc8/AXevzs9Z2T7+4gJ0ajlf9GfU1Ib/Xri7bVTzqs4PugMnzjNQgKEnCL5mixd7Tj0r/8DpCu+ErDBZnek7GQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHyFw5cS8QnaWtKM5P0FPUxAYl2fESdzXzjX16+u4TcAAiBVyZ4RJRh6pUwBIRiEbIJSDuSORU2Ocg+Y0Bp9xJnNIQ=="}],"size":3560,"noattachment":false,"key":"/ppost/-/ppost-0.1.0.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ppost-0.1.0.tgz_1492351288114_0.31256516743451357"},"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":1492351290210,"_cnpm_publish_time":1492351290210,"dist-tags":{"latest":"0.3.0"}}