Global

Methods

nodecat(fileNamesnon-null, optionsopt, callbackopt, nullable) → {Promise|undefined}

Concatenate named files.
Parameters:
Name Type Attributes Description
fileNames Array.<string> Names of files to be concatenated, in the order in which their content will appear. Files may appear multiple times. If the Array is empty, no output will be written.
options NodecatOptions <optional>
Options.
callback function <optional>
<nullable>
Callback with the first Error which occurred, if any. Note that concatenation continues after errors. Required if global.Promise is not defined.
Source:
Returns:
If callback is not given and global.Promise is defined, a Promise which resolves once all output has been written.
Type
Promise | undefined

nodecatCmd(argsnon-null, optionsopt, callbackopt, nullable) → {Promise.<number>|undefined}

Entry point for this command.
Parameters:
Name Type Attributes Description
args Array.<string> Command-line arguments.
options CommandOptions <optional>
Options.
callback function <optional>
<nullable>
Callback for the exit code or an Error. Required if global.Promise is not defined.
Source:
Returns:
If callback is not given and global.Promise is defined, a Promise with the exit code or Error.
Type
Promise.<number> | undefined

Type Definitions

CommandOptions

Options for command entry points.
Type:
  • Object
Properties:
Name Type Attributes Description
inStream stream.Readable <optional>
Stream from which the file named '-' (also the default if no file names are given) is read. (default: process.stdin)
outStream stream.Writable <optional>
Stream to which output is written. (default: process.stdout)
errStream stream.Writable <optional>
Stream to which errors (and non-output status messages) are written. (default: process.stderr)
Source:

CommandOptions

Options for nodecat.
Type:
  • Object
Properties:
Name Type Attributes Description
fileStreams Object.<string, !stream.Readable> <optional>
Mapping from file names to readable streams which will be read for the named file. If the file appears multiple times, the stream is only read once.
outStream stream.Writable <optional>
Stream to which concatenated output is written. (default: process.stdout)
errStream stream.Writable <optional>
Stream to which errors (and non-output status messages) are written. (default: process.stderr)
Source: