No description
Find a file
Renovate Bot 439bce6fac
All checks were successful
continuous-integration/drone/push Build is passing
Update dependency np to v8 (#67)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [np](https://github.com/sindresorhus/np) | devDependencies | major | [`^7.7.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/np/7.7.0/8.0.4) |

---

### Release Notes

<details>
<summary>sindresorhus/np (np)</summary>

### [`v8.0.4`](https://github.com/sindresorhus/np/releases/tag/v8.0.4)

[Compare Source](https://github.com/sindresorhus/np/compare/v8.0.3...v8.0.4)

-   Handle first time display of dependencies ([#&#8203;707](https://github.com/sindresorhus/np/issues/707))  [`3f43d78`](https://github.com/sindresorhus/np/commit/3f43d78)

### [`v8.0.3`](https://github.com/sindresorhus/np/releases/tag/v8.0.3)

[Compare Source](https://github.com/sindresorhus/np/compare/v8.0.2...v8.0.3)

-   Fix skipping publish step ([#&#8203;706](https://github.com/sindresorhus/np/issues/706))  [`51dcc2d`](https://github.com/sindresorhus/np/commit/51dcc2d)

### [`v8.0.2`](https://github.com/sindresorhus/np/releases/tag/v8.0.2)

[Compare Source](https://github.com/sindresorhus/np/compare/v8.0.1...v8.0.2)

-   Fix publish not working with Yarn  [`3d448c2`](https://github.com/sindresorhus/np/commit/3d448c2)
-   Include stack trace in errors  [`12fce88`](https://github.com/sindresorhus/np/commit/12fce88)

### [`v8.0.1`](https://github.com/sindresorhus/np/releases/tag/v8.0.1)

[Compare Source](https://github.com/sindresorhus/np/compare/v8.0.0...v8.0.1)

-   Fix a crash in the new dependency check  [`beb7db1`](https://github.com/sindresorhus/np/commit/beb7db1)

### [`v8.0.0`](https://github.com/sindresorhus/np/releases/tag/v8.0.0)

[Compare Source](https://github.com/sindresorhus/np/compare/v7.7.0...v8.0.0)

##### Breaking

-   Require Node.js 16 ([#&#8203;683](https://github.com/sindresorhus/np/issues/683))  [`72879e0`](https://github.com/sindresorhus/np/commit/72879e0)

##### Improvements

-   Add 2FA support for npm version 9+ ([#&#8203;693](https://github.com/sindresorhus/np/issues/693))  [`9cb4bfd`](https://github.com/sindresorhus/np/commit/9cb4bfd)
-   Improve startup time ([#&#8203;688](https://github.com/sindresorhus/np/issues/688))  [`eba203f`](https://github.com/sindresorhus/np/commit/eba203f)
-   Improve the reliability of detecting which files will be included in the package ([#&#8203;682](https://github.com/sindresorhus/np/issues/682))  [`a6ce792`](https://github.com/sindresorhus/np/commit/a6ce792)
-   Add check for new dependencies ([#&#8203;681](https://github.com/sindresorhus/np/issues/681))  [`6867fb9`](https://github.com/sindresorhus/np/commit/6867fb9)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC43NC4yIiwidXBkYXRlZEluVmVyIjoiMzYuODkuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AifQ==-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/pulls/67
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2023-09-11 20:31:50 +01:00
.gitea Add Gitea templates 2023-02-24 17:33:39 +00:00
.github Create FUNDING.yml 2021-05-10 21:50:20 +01:00
.gitlab Update default.md 2021-01-15 18:15:14 +00:00
src Fix bug where the randomiser would pick -1 2023-05-29 16:48:01 +01:00
tests Setup Jest (#57) 2023-04-22 13:20:30 +01:00
.drone.yml Add push event to .drone.yml 2023-04-29 14:43:47 +01:00
.eslintignore Setup Jest (#57) 2023-04-22 13:20:30 +01:00
.eslintrc Setup Jest (#57) 2023-04-22 13:20:30 +01:00
.gitignore Fix bug where the randomiser would pick -1 2023-05-29 16:48:01 +01:00
.gitlab-ci.yml Add aslant to gitlab project ci 2021-01-13 21:08:47 +00:00
.npmignore Setup Jest (#57) 2023-04-22 13:20:30 +01:00
app.ts Update project to allow for ESM modules 2023-02-27 18:33:32 +00:00
CODE_OF_CONDUCT.md Update documentation with up to date information 2022-08-18 17:45:05 +01:00
CONTRIBUTING.md Fix documentation code breaks (#58) 2023-04-28 17:31:34 +01:00
jest.config.cjs Setup Jest (#57) 2023-04-22 13:20:30 +01:00
jest.setup.js Setup Jest (#57) 2023-04-22 13:20:30 +01:00
LICENSE Update licence copyright to 2023 (#59) 2023-04-28 17:31:55 +01:00
package.json Update dependency np to v8 (#67) 2023-09-11 20:31:50 +01:00
readme.md Updatr documentation to remove maxTries variable 2023-02-22 18:19:47 +00:00
renovate.json Update 'renovate.json' 2022-12-28 18:43:41 +00:00
tsconfig.json Setup Jest (#57) 2023-04-22 13:20:30 +01:00
yarn.lock Update dependency np to v8 (#67) 2023-09-11 20:31:50 +01:00

random-bunny

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

Install

npm install --save random-bunny

or if you're using yarn

yarn add random-bunny

Usage

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 2 arguments: subreddit, and sortby ('new', 'hot', 'top')

The json string which gets returned consists of:

  • archived
  • downs
  • hidden
  • permalink
  • subreddit
  • subredditSubscribers
  • title
  • ups
  • url

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

Notes

License

MIT © Vylpes