https://github.com/deptno/ora-p
🧤 Promise based currying ora function
https://github.com/deptno/ora-p
cli curried currying loading ora promise terminal
Last synced: 8 months ago
JSON representation
🧤 Promise based currying ora function
- Host: GitHub
- URL: https://github.com/deptno/ora-p
- Owner: deptno
- Created: 2018-08-10T17:34:23.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-10T17:34:36.000Z (about 7 years ago)
- Last Synced: 2024-12-31T13:46:19.972Z (9 months ago)
- Topics: cli, curried, currying, loading, ora, promise, terminal
- Language: TypeScript
- Homepage:
- Size: 87.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ora-p
> Promise based currying ora function

## Install
```sh
npm install ora-p
```## Usage
```typescript
ora('text', promise)
```#### with currying
```typescript
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