Skip to content

Commit 0186051

Browse files
committed
add docs for new removeProcess
1 parent 484bc76 commit 0186051

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,17 @@ call [`IPOS.new()`](#static-iposnew-ipos--promiseipos) for the two processes' IP
127127

128128
**Returns:** `Promise<void>`. Use await to wait for the connection to the subprocess to be established.
129129

130+
### `ipos.removeProcess(process: ChildProcess): boolean`
131+
132+
Disconnect a subprocess to the IPOS instance. Closed subprocess automatically get disconnected.
133+
134+
**Parameters:**
135+
136+
- `process: ChildProcess` The object of a subprocess IPOS should disconnect from. What gets returned
137+
by `child_process.exec()`, `child_process.execFile()`, `child_process.fork()`, or `child_process.spawn()`
138+
139+
**Returns:** `boolean`. `true` if a process was connected and has been disconnected, or `false` if the process was not connected.
140+
130141
### `ipos.create(key: string, value: any)`
131142

132143
Create a field on the IPOS instance. This value can later be accessed or updated (See

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ipos",
3-
"version": "0.1.3",
3+
"version": "0.2.0",
44
"description": "Share objects across different Node.js processes. Write and read on both sides.",
55
"license": "MIT",
66
"main": "lib/main.js",

0 commit comments

Comments
 (0)