
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
npm install wetbox
let WET = require( 'wetbox' )
getVersion()
Returns the current in-use version of the library
getUrl( url, callback )
Fetches an external API url (typically json) and performs callback( status, response ) when loaded.
Status being a nubmer (ie 400), and response being the data.
zeros( n )
Returns an array of zeros of lenth n
sequence( n )
Returns an array of numbers from 0 .. n-1
randInt( n )
Returns a random int from 0 .. n-1
compress( array )
Remove all zero and falsy values from an array
randomizeArray( array )
Returns array with random-ordered elements using the Fisher-Yates-Knuth shuffle.
leftPad( str, len, fillerChar )
Pads a string up to length len, with single-char: fillerChar (defaults to space character)
toRadians( x )
Convert x degrees to radians
toDegrees( x )
Convert x radians to degrees
new WET.game( THREE )
Given a three.js library let THREE = require( 'three' ), initialize a basic game environment
keyListen( isEnable, up, left, down, right, crouch, space, esc, tab, enter )
Adds some keyboard listeners to the page for typical game commands. All input params are callback functions, first 5 are mandatory.
WET.keyListen(
() => { return true },
() => { console.log( 'up' ) },
() => { console.log( 'left' ) },
() => { console.log( 'down' ) },
() => { console.log( 'right' ) },
() => { console.log( 'crouch' ) },
() => { console.log( 'space' ) },
() => { console.log( 'esc' ) },
() => { console.log( 'tab' ) },
() => { console.log( 'enter' ) },
)
keyUpListen( up, left, down, right, crouch )
Adds key-release listeners for switch-keys, all args are callbacks and always enabled.
WET.keyUpListen(
() => { console.log( 'release up' ) },
() => { console.log( 'release left' ) },
() => { console.log( 'release down' ) },
() => { console.log( 'release right' ) },
() => { console.log( 'release crouch' ) },
)
FAQs
A collection of prototype tools
We found that wetbox 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
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.