@pxpcandy/js-wrapper
v1.2.0
Published
This is a wrapper of JavaScript, hopefully making everything easier to use
Downloads
1
Readme
What is this?
This is a wrapper of JavaScript, hopefully making everything easier to use
Installation
npm i @pxpcandy/js-wrapper --save
Docs
/*
EXTRA INFORMATION
- You can only create one page with webserver
- The divide/multiply/subtract functions aren't working
*/
// import wrapper
const wrapper = require("./wrapper/index");
// variables
var array = [0, 1, 2, 3, 4, 5];
wrapper.log(wrapper.array.length(array));
// callback functions
function callback_001() {
wrapper.log("loop_func_callback");
}
function callback_002() {
wrapper.log("wait_func_callback");
}
// functions
wrapper.log("hello"); // logs value to console
wrapper.log(wrapper.inf()); // wrapper.inf() returns Infinity
wrapper.log(wrapper.ninf()); // wrapper.ninf() returns -Infinity
//wrapper.loop(500, callback_001); // every x ms this returns a callback function
wrapper.wait(500, callback_002); // waits x ms then returns a callback function
wrapper.log(wrapper.math.add(5, 5, 10)); // add arguments
wrapper.log(wrapper.math.divide(10, 2)); // divide arguments
wrapper.log(wrapper.math.multiply(10, 2)); // multiply arguments
wrapper.log(wrapper.math.subtract(10, 3)); // subtract arguments
wrapper.utils.webserver("./webserver-test/index.html"); // creates a web server
Discord
Join our Discord @ https://discord.gg/zyFsS8e