{"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","tarball":"http://registry-npm.ywwl.com/ppost/download/ppost-0.0.1.tgz","integrity":"sha512-TtIuZgUhkXYIUumwb2NSv98XTl4VgY13v0E9W2DwI8ns7ME8AS8uLs8zHqmm4X1a/4Dz5nnLvp5GuhlNIqTQKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE6CGKbZLJMZackTgehn2hOYIg4y5H5og6JkLg4tnPCUAiEAvrFIfNzb6XAWkYAa537N50FB3+p31Kqu09GjXqGEENA="}],"size":3318,"noattachment":false,"key":"/ppost/-/ppost-0.0.1.tgz"},"maintainers":[{"name":"jarends","email":"joa@nettrek.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ppost-0.0.1.tgz_1492188174854_0.9669808140024543"},"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":1492188176857,"_cnpm_publish_time":1492188176857,"dist-tags":{"latest":"0.3.0"}}