Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
blooket.js
Advanced tools
In version 0.1, the JS is only for pre release. The only game mode supported is Gold Quest
, and all of the features do not work fully.
Better documentation coming soon to blooket.js.org.
Run npm install blooket.js
to install Blooket.JS
To import the package, use
const Blooket = require("blooket.js")
const game = new Blooket()
Then, to join a game, use
game.join(pin,name,animal)
Since blooket.js emits events, you can use game.on
to catch them. Some examples are below
game.on("SocketConnect", function(s) {
console.log("Connected to socket " + s.url)
})
game.on("DataReceived", function(s) {
console.log("Connected to a " + s[1] + " game. The ID is " + s[0])
})
game.on("joined", function(player) {
console.log(`joined as ${player.name}`)
})
game.on("GameStart", function() {
console.log("The game is starting!")
})
game.on("QuestionStart", function(q) {
game.answer(3) // The game.answer function answers the question, in this case, it will answer the third possible response.
})
game.on("Correct", function() {
console.log("Yay! You answered correctly")
})
game.on("NextQuestion", function() {
console.log("Question Completed!")
game.startquestion() // this functions begins the next question
})
// The following are specific to Gold Quest
game.on("GetGold", function() {
console.log("Collect your gold")
game.getgold(1) // This function says to collect the gold (or prize). Out of the 3 randomly chosen prizes (see the "goldchance.js" file), this will pick the 1st one.
})
game.on("Steal", function(data) {
console.log("Stealing from the first player...")
game.rob(Object.keys(data)[0]) // This function says to steal from the first player. You can use the players name, or Object.keys(data)[0], replacing zero with the player number.
})
game.on("Swap", function(data) {
console.log("swapping with the first player...")
game.swap(Object.keys(data)[0]) // This function says to swap with the first player. You can use the players name, or Object.keys(data)[0], replacing zero with the player number. The swap function does not do anything to you, but it does swap the other players score.
})
FAQs
Blooket.js has been taken down per request of Blooket
The npm package blooket.js receives a total of 1 weekly downloads. As such, blooket.js popularity was classified as not popular.
We found that blooket.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.