1.0.7 • Published 5 years ago
pieall v1.0.7
pieall
Pieall is a library to make some stuff shorter to code.
Functions
GetArgs
Useful for discord.js,bots and other things,this returns arguments from a string.
//Expected parameters:
//String
var pieall = require("pieall")
//this string is a template,you can use anything else
pieall.GetArgs("cat car cash")
//Expected output:
//Array : ["car","cash"]
RandomNumber
Returns a random integer from the range you choose
//Expected parameters:
//Number to start from
//Number to end
var pieall = require("pieall")
//these numbers are a template,you can use anything else
pieall.RandomNumber(1,23)
//Expected output:
//Number
arrayrandom
Returns a random value from your array
//Expected parameters:
//Array
var pieall = require("pieall")
pieall.RandomNumber(Array) //replace array with the name of your array
delay
Does the same as setTimeout() except instead of milliseconds you use seconds.
//Expected parameters:
//function
//seconds
var pieall = require("pieall")
var afunction = function {
console.log("normal stuff i guess")
}
pieall.delay(afunction,8)
//Expected output:
//"normal stuff i guess" (in console)
interval
Does the same as setInterval() except instead of milliseconds you use seconds.
//Expected parameters:
//function
//seconds
var pieall = require("pieall")
var afunction = function {
console.log("even more normal stuff i guess")
}
pieall.interval(afunction,8)
//Expected output:
//"even more normal stuff i guess" (in console)