Compare commits
No commits in common. "f67e001cf01b063166c28d54a54174c2e94235b0" and "e7620ccd425d66cce69e098ac3b8023d6db4a3e7" have entirely different histories.
f67e001cf0
...
e7620ccd42
4 changed files with 21 additions and 13 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
node_modules/
|
||||
dist/
|
||||
coverage/
|
||||
yarn-error.log
|
||||
node_modules
|
||||
dist
|
||||
yarn-error.log
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "random-bunny",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.1",
|
||||
"description": "Get a random subreddit image url",
|
||||
"license": "MIT",
|
||||
"author": "Vylpes",
|
||||
|
@ -49,8 +49,7 @@
|
|||
"typescript": "^5.0.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"np/**/got": "^11.8.5",
|
||||
"**/semver": "^7.5.2"
|
||||
"np/**/got": "^11.8.5"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
|
|
@ -41,8 +41,8 @@ export default async function randomBunny(subreddit: string, sortBy?: string): P
|
|||
return {
|
||||
IsSuccess: false,
|
||||
};
|
||||
} else {
|
||||
random = Math.floor((Math.random() * (dataWithImages.length - 1)) + 0); // Between 0 and (size - 1)
|
||||
} else if (dataWithImages.length > 1) {
|
||||
random = Math.floor((Math.random() * dataWithImages.length - 1) + 0); // Between 0 and (size - 1)
|
||||
}
|
||||
|
||||
const randomSelect = dataWithImages[random];
|
||||
|
|
18
yarn.lock
18
yarn.lock
|
@ -3841,13 +3841,23 @@ semver-diff@^3.1.1:
|
|||
dependencies:
|
||||
semver "^6.3.0"
|
||||
|
||||
"semver@2 || 3 || 4 || 5", semver@7.x, semver@^6.0.0, semver@^6.2.0, semver@^6.3.0, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.2:
|
||||
version "7.5.3"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e"
|
||||
integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==
|
||||
"semver@2 || 3 || 4 || 5":
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||
|
||||
semver@7.x, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7:
|
||||
version "7.5.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec"
|
||||
integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
|
||||
shebang-command@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
|
||||
|
|
Loading…
Reference in a new issue