2.0.1 • Published 2 years ago

node-console-loading v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

License

MIT

2.0.1

2 years ago

2.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago