@trivia-api/models
Version:
Models for The Trivia API.
22 lines (21 loc) • 514 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCategory = void 0;
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);
};
exports.isCategory = isCategory;