UNPKG

@trivia-api/models

Version:

Models for The Trivia API.

18 lines (17 loc) 382 B
export const isCategory = (arg) => { if (typeof arg !== "string") { return false; } return [ "music", "sport_and_leisure", "film_and_tv", "arts_and_literature", "history", "society_and_culture", "science", "geography", "food_and_drink", "general_knowledge", ].includes(arg); };