1.0.0-GA • Published 2 years ago
@xumeng03/ora v1.0.0-GA
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
2 years ago
1.0.0-rc.8
2 years ago
1.0.0-rc.5
2 years ago
1.0.0-rc.6
2 years ago
1.0.0-rc.3
2 years ago
1.0.0-rc.4
2 years ago
1.0.0-rc.2
2 years ago
1.0.0-rc.1
2 years ago