Class

WithCommand

Commands.WithCommand()

Allows for more complex logic by allowing you to control the output/input for commands while keeping the commands readable

basically sets whatever the result of the with operation into the source portion until it finds the endwith command

Source object:

  • any
Constructor

# new WithCommand()

View Source services/dt/commands/with.js, line 21

Extends

Methods

# protected _parseCommand(command, next, callbackopt) → {string|object}

Parameters:
Name Type Attributes Description
command Array.<string> | string

the command split into words

next Array.<string>

the following Commands

callback function <optional>

for async versatility

Overrides:

View Source services/dt/commands/with.js, line 33

the command argument

string | object

# protected _runCommand(arg, bar, options, callback)

Parameters:
Name Type Description
arg Array.<string>

the command argument

bar Archive
options object
callback function
Overrides:

View Source services/dt/commands/with.js, line 67

# execute(args, baropt, nextopt, optionsopt, callback)

Parses the command text and executes the command onto the provided DSU

.

Parses the command text and executes the command onto the provided DSU

Parameters:
Name Type Attributes Description
args Array.<string> | string

the arguments of the command split into words

bar Archive | KeySSI <optional>

the destinationDSU or the keySSI

next Array.<string> <optional>

the remaining commands

options object <optional>
callback function
Overrides:

View Source services/dt/commands/Command.js, line 45