diff options
| author | Bobby <[email protected]> | 2022-01-28 17:16:01 -0500 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-01-28 17:16:01 -0500 |
| commit | 6645a8a8ddcbc46b20f1c662ee259da3315e8d51 (patch) | |
| tree | e9e6fb2ca04579eed00479272d6b758cf32aeb15 /src/lib/display.ts | |
| parent | 3e84c49170fc99a692ce8874d7f1545747919986 (diff) | |
| download | izuku.js-6645a8a8ddcbc46b20f1c662ee259da3315e8d51.tar.xz izuku.js-6645a8a8ddcbc46b20f1c662ee259da3315e8d51.zip | |
feat: showAll function and fix sort method
Diffstat (limited to 'src/lib/display.ts')
| -rw-r--r-- | src/lib/display.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/display.ts b/src/lib/display.ts index c189434..1af1f84 100644 --- a/src/lib/display.ts +++ b/src/lib/display.ts @@ -112,6 +112,20 @@ export function show(this: Frame): void { } /** + * showAll prints the frame without truncating + * @returns the current frame + */ +export function showAll(this: Frame): void { + if (this.rowdata.length === 0) { + console.log('No data found'); + } else { + displayTable( + getTable(this.rowdata, this.columns, undefined, this.tableTitle) + ); + } +} + +/** * head prints maximum first n rows of the frame * @param n: the number of rows to be returned * @returns the first n rows of the frame as array of arrays |
