You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChildProcess; |Class. ChildProcess is an EventEmitter|
@@ -147,12 +155,10 @@ child_process.exec(command, [options], callback); |Runs a command in
147
155
child_process.execFile(file, [args], [options], [callback]); |Runs a command in a shell and buffers the output.|
148
156
child_process.fork(modulePath, [args], [options]); |This is a special case of the spawn() functionality for spawning Node processes. In addition to having all the methods in a normal ChildProcess instance, the returned object has a communication channel built-in. |
149
157
150
-
151
-
#### Util
158
+
## Util
152
159
153
160
These functions are in the module 'util'. Use require('util') to access them.
|emitter.addListener(event, listener); |Adds a listener to the end of the listeners array for the specified event.|
@@ -188,12 +192,10 @@ All EventEmitters emit the event 'newListener' when new listeners are added and
188
192
|emitter.emit(event, [arg1], [arg2], [...]); |Execute each of the listeners in order with the supplied arguments. Returns true if event had listeners, false otherwise.|
189
193
|EventEmitter.listenerCount(emitter, event); |Return the number of listeners for a given event.|
190
194
191
-
192
-
#### Stream
195
+
## Stream
193
196
194
197
A stream is an abstract interface implemented by various objects in Node. For example a request to an HTTP server is a stream, as is stdout. Streams are readable, writable, or both. All streams are instances of EventEmitter.
195
198
196
-
197
199
The Readable stream interface is the abstraction for a source of data that you are reading from.
198
200
In other words, data comes out of a Readable stream.
199
201
A Readable stream will not start emitting data until you indicate that you are ready to receive it.
@@ -203,6 +205,7 @@ zlib streams, crypto streams, tcp sockets, child process stdout and stderr, proc
|readable.on('readable', function() {}); |When a chunk of data can be read from the stream, it will emit a 'readable' event|
@@ -217,7 +220,6 @@ var readable = getReadableStreamSomehow();
217
220
|readable.unpipe([destination]); |This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed.|
218
221
|readable.unshift(chunk); |This is useful in certain cases where a stream is being consumed by a parser, which needs to "un-consume" some data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party.|
219
222
220
-
221
223
The Writable stream interface is an abstraction for a destination that you are writing data to.
222
224
Examples of writable streams include: http requests on the client, http responses on the server, fs write streams,
|fs.rename(oldPath, newPath, callback); |Asynchronous rename. No arguments other than a possible exception are given to |the completion callback.Asynchronous ftruncate. No arguments other than a possible exception are given to the completion callback.|
@@ -325,21 +325,18 @@ All the methods have asynchronous and synchronous forms.
325
325
|stats.isFIFO()||
326
326
|stats.isSocket()||
327
327
328
-
329
328
```javascript
330
329
fs.createReadStream(path, [options]); // Returns a new ReadStream object.
331
330
fs.createWriteStream(path, [options]); // Returns a new WriteStream object.
332
331
```
333
332
334
-
335
-
#### Path
333
+
## Path
336
334
337
335
Use require('path') to use this module.
338
336
This module contains utilities for handling and transforming file paths.
339
337
Almost all these methods perform only string transformations.
340
338
The file system is not consulted to check whether paths are valid.
|querystring.stringify(obj, [sep], [eq]); | Serialize an object to a query string. Optionally override the default separator ('&') and assignment ('=') characters.|
437
427
|querystring.parse(str, [sep], [eq], [options]); | Deserialize a query string to an object. Optionally override the default |separator ('&') and assignment ('=') characters.|
438
428
439
-
440
-
#### Assert
429
+
## Assert
441
430
442
431
This module is used for writing unit tests for your applications, you can access it with require('assert').
|assert.fail(actual, expected, message, operator); |Throws an exception that displays the values for actual and expected separated by the provided operator.|
@@ -456,13 +444,11 @@ This module is used for writing unit tests for your applications, you can access
456
444
|assert.doesNotThrow(block, [message]); |Expects block not to throw an error, see assert.throws for details.|
457
445
|assert.ifError(value); |Tests if value is not a false value, throws if it is a true value. |Useful when testing the first argument, error in callbacks.|
458
446
459
-
460
-
#### OS
447
+
## OS
461
448
462
449
Provides a few basic operating-system related utility functions.
0 commit comments