Struktur berkas konfigurasi JavaScript dan JSON lokal untuk pengujian katalog vw180.
{ } config.js{ } config.json
Salin kode
JavaScript
// Konfigurasi objek lokal game vw180
const clientConfig = {
brand: "vw180" ,
domain: "vw180games.com" ,
country: "id" ,
language: "Bahasa Indonesia" ,
activeCatalog: [
{ id: "163" , name: "Oishi Delights" , category: "Slot" },
{ id: "193" , name: "Reel Royale Sd" , category: "Slot" },
{ id: "018" , name: "Hood Wolf" , category: "Slot" },
{ id: "190" , name: "Mayan Destiny" , category: "Slot" },
{ id: "075" , name: "Sct Cleopatra" , category: "Slot" }
],
supportStatus: "active"
};
function getGameTitle(gameId) {
const target = clientConfig.activeCatalog.find(item => item.id === gameId);
return target ? target.name : "Tidak Ditemukan" ;
}
// Cetak hasil pengecekan lokal
console.log("Platform:" , clientConfig.brand);
console.log("Game Terpilih:" , getGameTitle("163" )); JSON
{
"brand" : "vw180" ,
"domain" : "vw180games.com" ,
"country" : "id" ,
"language" : "Bahasa Indonesia" ,
"activeCatalog" : [
{
"id" : "163" ,
"name" : "Oishi Delights" ,
"category" : "Slot"
},
{
"id" : "193" ,
"name" : "Reel Royale Sd" ,
"category" : "Slot"
},
{
"id" : "018" ,
"name" : "Hood Wolf" ,
"category" : "Slot"
},
{
"id" : "190" ,
"name" : "Mayan Destiny" ,
"category" : "Slot"
},
{
"id" : "075" ,
"name" : "Sct Cleopatra" ,
"category" : "Slot"
}
],
"supportStatus" : "active"
}