consoleload
v1.2.1
Published
A fully customizable loading animation package for your Console Logs.
Downloads
3
Maintainers
Readme
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.