Skrip konfigurasi objek lokal dan format JSON untuk pemetaan katalog permainan 99sl.
{ } example.js{ } example.json
Salin kode
JavaScript
// Konfigurasi objek lingkungan lokal untuk 99sl
const platformEnvironment = {
brand: "99sl" ,
domain: "99slgameid.com" ,
country: "id" ,
defaultLanguage: "id-ID" ,
catalog: [
{ id: "102" , name: "Buffalo Win" , category: "Slot" },
{ id: "155" , name: "Anubis Wrath" , category: "Slot" },
{ id: "028" , name: "Gem Saviour Sword" , category: "Petualangan" },
{ id: "196" , name: "Zombie Blaster" , category: "Aksi" },
{ id: "003" , name: "Fortune Gods" , category: "Slot" }
]
};
function getGameInfo(id) {
return platformEnvironment.catalog.find(game => game.id === id) || null ;
}
// Ekspor objek lokal
module.exports = { platformEnvironment, getGameInfo }; JSON
{
"platform" : {
"brand" : "99sl" ,
"domain" : "99slgameid.com" ,
"country" : "id" ,
"language" : "Bahasa Indonesia"
},
"catalog" : [
{
"id" : "102" ,
"name" : "Buffalo Win" ,
"category" : "Slot"
},
{
"id" : "155" ,
"name" : "Anubis Wrath" ,
"category" : "Slot"
},
{
"id" : "028" ,
"name" : "Gem Saviour Sword" ,
"category" : "Petualangan"
},
{
"id" : "196" ,
"name" : "Zombie Blaster" ,
"category" : "Aksi"
},
{
"id" : "003" ,
"name" : "Fortune Gods" ,
"category" : "Slot"
}
]
}