Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryPeach committed May 9, 2020
1 parent 5fbacff commit efdb5b9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## Usage

```typescript
import { Kia } from "./kia.ts";
import Kia from "./mod.ts";

const kia = new Kia("Hello");
await kia.start();
Expand Down Expand Up @@ -131,6 +131,17 @@ Stops the spinner, and returns a message with the current text or the provided `

### forPromise(action, options)

```typescript
import { forPromise } from "./mod.ts";

forPromise(
async () => {
await yourAsyncAction();
},
{ text: name }
);
```

Starts a spinner for a promise. The spinner is stopped with `.succeed()` if the promise fulfills or with `.fail()` if it rejects. Returns the spinner instance.

#### action
Expand Down

0 comments on commit efdb5b9

Please sign in to comment.