Repository
Current version released
3 years ago
Versions
deno_spin
Deno porting of go-spin.
Usage
import Spinner from "https://deno.land/x/deno_spin@v0.0.3/mod.ts";
console.log("[Default] box1: ⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏");
const box1 = new Spinner();
for (let i = 0; i < 30; i++) {
await box1.next();
}
console.log("box2: ⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓");
console.log("and drawInterval: 200msec");
const box2 = new Spinner({ type: "box2", drawInterval: 200 });
for (let i = 0; i < 15; i++) {
await box2.next();
}
Parameter
When creating a Spinner instance, it is possible to specify the Spinner type and drawInterval.
- type
- drawInterval
Note
Note that until v0.0.2
, the parameters for instance creation looked like this.
// new Spinner(type, drawInterval)
new Spinner("box1", 100);
For v0.0.3
and later, please set the parameters as follows.
new Spinner({ type: "box1", drawInterval: 100 });
GIF
Thank you
The implementation in this repository is a port of the implementation in go-spin for Deno.
Licence
The Licence is MIT, according to the license of go-spin.