ora-p
v0.1.2
Published
simple ora curried function, just two argument(text, promise)
Downloads
9
Readme
ora-p
Promise based currying ora function
Install
npm install ora-p
Usage
ora('text', promise)
with currying
import ora from 'ora-p'
// promise delay helper
const delayO = time => new Promise(r => setTimeout(r, time))
const delayX = time => new Promise((_, r) => setTimeout(r, time))
// currying
const load = ora('loading')
const search = ora('searching')
async function main() {
await load(delayO(1000))
await search(delayO(1000))
await load(delayO(1000))
await search(delayX(1000))
}
main() // screenshot
License
MIT