1.0.0-GA • Published 5 months ago

@xumeng03/ora v1.0.0-GA

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

Ora

easily use spinner in terminal.

Install

npm install @xumeng03/ora

Usage

import ora from '@xumeng03/ora';

async function fn1() {
    return new Promise<any>((resolve, reject) => {
        setTimeout(() => {
            resolve("aaaa")
            // reject("Fn Fail!")
        }, 2000)
    });
}
async function fn2() {
    return new Promise<any>((resolve, reject) => {
        setTimeout(() => {
            // resolve("aaaa")
            reject("Fn Fail!")
        }, 2000)
    });
}

async function test() {
    await oraPromise(fn1, new ORAOption())
    await oraPromise(fn2, new ORAOption())
}

test().then(() => process.exit(0)).catch((error) => {
    console.error(error);
    process.exit(1);
});

References

1.0.0-GA

5 months ago

1.0.0-rc.8

5 months ago

1.0.0-rc.5

5 months ago

1.0.0-rc.6

5 months ago

1.0.0-rc.3

5 months ago

1.0.0-rc.4

5 months ago

1.0.0-rc.2

5 months ago

1.0.0-rc.1

5 months ago