Skip to content

Commit

Permalink
chore(socket-node): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Oct 9, 2023
1 parent 0bae82c commit 1de4d61
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions npm/packages/@socketsupply/socket-node/API.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### [`send(options)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L168)
### [`send(options)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L190)

Send event to webview via IPC

Expand All @@ -13,15 +13,15 @@ Send event to webview via IPC
| :--- | :--- | :--- |
| Not specified | Promise<Error \| undefined> | |

### [`heartbeat()`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L198)
### [`heartbeat()`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L220)

Send the heartbeat event to the webview.

| Return Value | Type | Description |
| :--- | :--- | :--- |
| Not specified | Promise<Error \| undefined> | |

### [`addListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L209)
### [`addListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L231)

Adds a listener to the window.

Expand All @@ -30,7 +30,7 @@ Adds a listener to the window.
| event | string | | false | the event to listen to |
| cb | function(*): void | | false | the callback to call |

### [`on(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L220)
### [`on(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L242)

Adds a listener to the window. An alias for `addListener`.

Expand All @@ -39,7 +39,7 @@ Adds a listener to the window. An alias for `addListener`.
| event | string | | false | the event to listen to |
| cb | function(*): void | | false | the callback to call |

### [`once(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L230)
### [`once(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L252)

Adds a listener to the window. The listener is removed after the first call.

Expand All @@ -48,7 +48,7 @@ Adds a listener to the window. The listener is removed after the first call.
| event | string | | false | the event to listen to |
| cb | function(*): void | | false | the callback to call |

### [`removeListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L240)
### [`removeListener(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L262)

Removes a listener from the window.

Expand All @@ -57,15 +57,15 @@ Removes a listener from the window.
| event | string | | false | the event to remove the listener from |
| cb | function(*): void | | false | the callback to remove |

### [`removeAllListeners(event)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L249)
### [`removeAllListeners(event)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L271)

Removes all listeners from the window.

| Argument | Type | Default | Optional | Description |
| :--- | :--- | :---: | :---: | :--- |
| event | string | | false | the event to remove the listeners from |

### [`off(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L260)
### [`off(event, cb)`](https://github.com/socketsupply/socket/blob/master/npm/packages/@socketsupply/socket-node/index.js#L282)

Removes a listener from the window. An alias for `removeListener`.

Expand Down

0 comments on commit 1de4d61

Please sign in to comment.