---
description: An example of how to generate a random cat image!
---

# Random Cat Image

## Code

```javascript
// This snippet uses some-random-cat version 2.0

const somethingRandom = require('some-random-cat').Random
somethingRandom.getCat()
.then(res => {
    console.log(res)
    return
}) // Get the result
.catch(e => {
    console.error(e)
    return
}) // Catch the error
```

## Output

![](https://3133094034-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MNWYMnKi7gt-dpc7vrC%2F-MNW_MxIGL4J-ltolzsx%2F-MNWcTy__779hT9gd8a7%2Fcat.PNG?alt=media\&token=d2241495-90ce-4993-9549-3e1039ceb2e7)
