Members
config
Properties| Name | Type | Attributes | Default | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config | object | <optional> | {} | Configuration object Properties
|
Methods
(async) getNpmPkgInfo(name) → {Promise.<object>}
Get package information from NPM registry
| Name | Type | Description |
|---|---|---|
name | string | Package name |
- Package information
- Type:
- Promise.<object>
getOutputFormat() → {string}
Get output format from configuration
- Output format
- Type:
- string
(async) hTable(…args) → {Promise.<any>}
Draw a horizontal table
| Name | Type | Attributes | Description |
|---|---|---|---|
args | any | <repeatable> | Arguments to be passed to the horizontal table |
- Result of the horizontal table
- Type:
- Promise.<any>
(async) prettyPrint(obj, printopt, titleFnopt) → {Promise.<string>}
Pretty print an object
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
obj | string | | Object to be pretty printed | ||
print | boolean | <optional> | false | Whether to print the result (if true) or return it (default: false) |
titleFn | function | <optional> | Function to generate titles |
- Pretty printed string
- Type:
- Promise.<string>
(async) runApplet(applet, path, …args) → {Promise.<any>}
Run an applet
| Name | Type | Attributes | Description |
|---|---|---|---|
applet | object | Applet object | |
path | string | Path to the applet | |
args | any | <repeatable> | Arguments to be passed to the applet |
- Result of the applet
- Type:
- Promise.<any>
(async) vTable(…args) → {Promise.<any>}
Draw a vertical table
| Name | Type | Attributes | Description |
|---|---|---|---|
args | any | <repeatable> | Arguments to be passed to the vertical table |
- Result of the vertical table
- Type:
- Promise.<any>
(async) writeOutput(content, path, terminate)
Write output to a file or console
| Name | Type | Description |
|---|---|---|
content | object | | Object or array to be written |
path | string | Path to the output file. Ignored if |
terminate | boolean | Whether to terminate the process after writing |