---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# RateCounter.prototype.lookupRate

Look up the current rate for the given `entry` and the given `window`.

## Syntax
```js
lookupRate(entry, window)
```

### Parameters

- `entry` _: string_
  - The name of the entry to look up
- `window` _: number_
  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds


### Return value

Returns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.

### Exceptions

- `TypeError`
  - Thrown if the provided `entry` value can not be coerced into a string
  - Thrown if the provided `window` value is not either, 1, 10, or 60.
