Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricsam/ipc-promises
Promise interface for the ipc commands in electron.
https://github.com/ricsam/ipc-promises
Last synced: 17 days ago
JSON representation
Promise interface for the ipc commands in electron.
- Host: GitHub
- URL: https://github.com/ricsam/ipc-promises
- Owner: ricsam
- Created: 2017-04-07T02:23:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-07T17:14:12.000Z (over 7 years ago)
- Last Synced: 2024-10-10T18:43:21.729Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Promise interface for the ipc commands in electron.
#### Example
```javascript// renderer.js
import { ipcRenderer } from 'electron';
import ipc from 'ipc-promises';const tunnel = new ipc(ipcRenderer);
tunnel.send('getsomedata').then((resp) => {
// resp contains the data
});// main.js
import { ipcMain } from 'electron';
import ipc from 'ipc-promises';const tunnel = new ipc(ipcMain);
tunnel.on('getsomedata').then((id) => {
mainTunnel.respond(id, 'data not accessible by the renderer');
});```