Struktur konfigurasi objek JavaScript dan JSON untuk pengelolaan data katalog game secara lokal.
JavaScript
// Konfigurasi objek lokal katalog permainan 99sr
const platformConfig = {
brand: "99sr",
domain: "99srapp.com",
supportedPlatforms: ["android"],
featuredGames: [
{ id: "154", name: "Mystic Potions", category: "Permainan Slot" },
{ id: "083", name: "Fortune Ox", category: "Permainan Slot" },
{ id: "098", name: "Mermaid Riches", category: "Permainan Slot" },
{ id: "021", name: "Mr Hallow Jp", category: "Permainan Slot" },
{ id: "159", name: "Shark Bounty", category: "Permainan Slot" }
],
defaultLanguage: "id"
};
function getGameInfo(gameId) {
return platformConfig.featuredGames.find(game => game.id === gameId) || null;
}
// Ekspor objek konfigurasi lokal
module.exports = { platformConfig, getGameInfo };
JSON
{
"brand": "99sr",
"domain": "99srapp.com",
"supportedPlatforms": [
"android"
],
"featuredGames": [
{
"id": "154",
"name": "Mystic Potions",
"category": "Permainan Slot"
},
{
"id": "083",
"name": "Fortune Ox",
"category": "Permainan Slot"
},
{
"id": "098",
"name": "Mermaid Riches",
"category": "Permainan Slot"
},
{
"id": "021",
"name": "Mr Hallow Jp",
"category": "Permainan Slot"
},
{
"id": "159",
"name": "Shark Bounty",
"category": "Permainan Slot"
}
],
"defaultLanguage": "id"
}