random-anime
Version:
Generate random anime images with many features.
13 lines (10 loc) • 333 B
JavaScript
const anime = require("../database/anime.json");
const nsfw = require("../database/nsfw.json");
const animeRandom = () => {
return {
anime: () => anime[mathRandom(anime.length)],
nsfw: () => nsfw[mathRandom(nsfw.length)],
};
};
const mathRandom = (number) => ~~(Math.random() * number);
module.exports = animeRandom();