Utils
Helper functions that do not belong to any category in particular.
Functions
Section titled “Functions”diff()
Section titled “diff()”function diff(string1, string2): void;Defined in: functions/utils.ts:13
Helper function to print the differences between two strings. Similar to the
diff Unix program.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
string1 |
string |
string2 |
string |
Returns
Section titled “Returns”void
fatalError()
Section titled “fatalError()”function fatalError(...args): never;Defined in: functions/utils.ts:29
Helper function to print out an error message and then exit the program.
All of the arguments will be passed to the console.error function.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
readonly unknown[] |
Returns
Section titled “Returns”never
getArgs()
Section titled “getArgs()”function getArgs(): readonly string[];Defined in: functions/utils.ts:39
Helper function to get the command-line arguments passed to the program/script.
This is an alias for: process.argv.slice(2)
Returns
Section titled “Returns”readonly string[]
