Skip to content

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlindHawk committed Apr 11, 2024
1 parent 3c312dd commit 0e48177
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,21 @@ interface AudioData = {
| rollProbabilities(probs) | rolls the roulette using custom probabilities[] |
| asyncRollByIndex(promise) | rolls the roulette while waiting for the value in the promise |

**asyncRoll example**

```typescript
const { promise, resolve, reject } = Promise.withResolvers()

roulette.asyncRollByIndex(promise)

// keeps rolling while waiting for the value
axios.get('your_path').then((res) => {
resolve(res.data.rollIndex)
}).catch((error)=>{
reject(error)
})
```

</br>

## Variables
Expand Down

0 comments on commit 0e48177

Please sign in to comment.