mirror of
https://github.com/ION606/linkedin-api.git
synced 2026-05-15 06:16:54 +00:00
added logging
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import { cursorTo } from "readline";
|
||||
|
||||
|
||||
export class ReactionTypeCount {
|
||||
constructor({ count, reactionType }) {
|
||||
this.count = count;
|
||||
@@ -27,4 +30,27 @@ export class GenericEntity {
|
||||
constructor(data) {
|
||||
Object.assign(this, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export class LoadingBar {
|
||||
constructor(size) {
|
||||
this.size = size;
|
||||
this.cursor = 0;
|
||||
this.timer = null;
|
||||
|
||||
cursorTo(process.stdout, this.cursor);
|
||||
|
||||
// draw the initial outline
|
||||
process.stdout.write("\x1B[?25l");
|
||||
for (let i = 0; i < this.size; i++) {
|
||||
process.stdout.write("\u2591");
|
||||
}
|
||||
}
|
||||
|
||||
increment(amt) {
|
||||
cursorTo(process.stdout, this.cursor);
|
||||
for (let i = 0; i < amt; i++) process.stdout.write("\u2588");
|
||||
this.cursor += amt;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user