# random-bunny

> Get a random subreddit image url

Latest version **2.4.1** (published 2025-10-10) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install random-bunny
pnpm add random-bunny
yarn add random-bunny
bun add random-bunny
```

Provides the command `random-bunny`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.4.1 |
| Published | 2025-10-10 |
| First published | 2020-12-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 31 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vylpes |
| Maintainers | vylpes |
| Keywords | rabbit, bunny, bun, subreddit, reddit, random, placeholder |

## Links

- npm: https://www.npmjs.com/package/random-bunny
- Homepage: https://gitea.vylpes.xyz/RabbitLabs/random-bunny
- Issues: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/issues
- Funding: https://ko-fi.com/vylpes
- npm.io page: https://npm.io/package/random-bunny

## Dependencies (5)

- [linqts](https://npm.io/package/linqts.md) ^2.0.0
- [got-cjs](https://npm.io/package/got-cjs.md) ^12.5.4
- [commander](https://npm.io/package/commander.md) ^14.0.0
- [glob-parent](https://npm.io/package/glob-parent.md) ^6.0.0
- [htmlparser2](https://npm.io/package/htmlparser2.md) ^10.0.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.4.1 (latest) — 2025-10-10
- 2.4.0 — 2025-09-20
- 2.3.0 — 2024-08-07
- 2.2.0 — 2024-04-22
- 2.1.6 — 2024-04-12
- 2.1.5 — 2023-11-10
- 2.1.4 — 2023-09-13
- 2.1.3 — 2023-07-03
- 2.1.2 — 2023-05-29
- 2.1.1 — 2023-05-20
- 2.1.0 — 2023-04-29
- 2.0.6 — 2023-03-30
- 2.0.5 — 2023-01-27
- 2.0.4 — 2023-01-27
- 2.0.3 — 2022-12-18
- … 8 more at https://npm.io/package/random-bunny/versions

## README

# random-bunny

> Get a random image url from a subreddit of your choosing.

## Install

```bash
npm install --save random-bunny
```

or if you're using yarn

```bash
yarn add random-bunny
```

### Binary

The project can be downloaded as a binary for your system via the [GitHub Releases](https://github.com/Vylpes/random-bunny/releases) or [Gitea Releases](https://gitea.vylpes.xyz/RabbitLabs/random-bunny/releases) page.


## Usage

```ts
import randomBunny from "random-bunny";

// ... In an async function
const result = await randomBunny('rabbits', 'hot');
console.log(result);
```

## API

### `randomBunny()`

Returns a `json string` for a random post. Accepts 3 arguments: `subreddit`, `sortby` ('new', 'hot', 'top'), and `limit` (1-100, default 100)

The json string which gets returned consists of:
- archived
- author
- downs
- gallery
- hidden
- permalink
- subreddit
- subredditSubscribers
- title
- ups
- url

`sortBy` will default to 'hot' if not given or invalid

## CLI

Random bunny can also be used as a CLI. This is accessible via the executable (see git releases) or via `src/cli.ts`

For more details, see the [documentation](https://docs.vylpes.xyz/books/random-bunny).

## Notes

* Node 4 or newer.
* based upon [Random Puppy](https://github.com/dylang/random-puppy)

## Links

* Discord: [Server Link](https://go.vylpes.xyz/A6HcA)
* Support: [helpdesk@vylpes.com](mailto:helpdesk@vylpes.com)

## License

MIT © [Vylpes](https://www.vylpes.com)

---
_Source: https://npm.io/package/random-bunny · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
