2.0.1 • Published 2 years ago
node-console-loading v2.0.1
node-console-loading
An util function to show a simple loading animation on a terminal.
Tested Platforms
- Windows
Installation
yarn add node-console-loading
or
npm install node-console-loading
Usage
import createLoader from "node-console-loading";
//Creating a loading animation
createLoader(yourPromise, "Resolved! :)", "Rejected! :(");
//Use case using axios
import axios from "axios";
const requestPromise = axios.get("https://example.com/");
createLoader(requestPromise, "Resolved! :)", "Rejected! :(");
//Using your own custom animation
const frames = [
". ",
" . ",
" . ",
" .",
" . ",
" . ",
]
createLoader(yourPromise, "Resolved! :)", "Rejected! :(", frames);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.