1.2.1 âĸ Published 1 year ago
consoleload v1.2.1
Installation
npm install consoleload
Usage
const cload = require("consoleload");
(async () => {
let log = cload("Fetching user...", "basicspin");
//await sleep(2000);
// Code..
let log2 = cload("Fetching data...", "basicspin");
//await sleep(2000);
// Code..
log2.stop();
})();
Animations
Name | Author | Frames | Spacing |
---|---|---|---|
basicspin(default) | @ReXulEc | "-", "\", "|", "/" | default |
plusminus | @ReXulEc | "+", "-" | default |
moon | @ReXulEc | "đ", "đ", "đ", "đ", "đ", "đ", "đ", "đ" | default |
weather | @ReXulEc | "đ¤ī¸", "đ§ī¸", "âī¸", "đ¨ī¸", "đŠī¸", "đĻī¸" | 2 |
Options
cload(text, animationName || customAnimation, customFps, customSpace)
You can use these options like this:
(async () => {
const MyAnimation = {
fps: 5,
frames: [
"/",
"-",
"\\",
"-"
],
}
let log = cload("Loading with custom animation with 5fps and 5 space..", MyAnimation, null, 5);
await sleep(5000);
log.stop();
})();
Output:
Contribute
You can create pr to add your own json. Just dont forget to add animation's name to types.