azul-helper v1.9.7
Azul Helper
Some functions that may help you somehow
Prerequisites
I recommend to try this only in node V10/LTS or above.
Installing
npm install azul-helperLicense
This project is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
- Almost every Method returns a promise, so you can use 
awaitorthen - Thats all folks!
 
Methods
sleep(ms)
Returns a promise that is solved after ms miliseconds, good to use await or then
mstime in miliseconds
isURL(str)
Checks if str is a valid valid url, by returning true or false
strdesired string to do the magic
isTradeOfferURL(str)
Checks if str is a valid trade offer url, by returning true or false
strdesired string to do the magic
isValidSteamID(str)
Checks if str is a valid SteamID, by returning true or false
strdesired string to do the magic
isSteamID64(str)
Checks if str is a valid SteamID64, by returning true or false
strdesired string to do the magic
GetSteamID64FromURL(str)
Returns the first SteamID64 found in a desired string, can return null if didn't manage to find any
strdesired string to do the magic
TimeStamp(date)
Return an object with a formated date YYYY-MM-DD and time HH:mm:ss of the date date or the current system time if ommited.
datedate to be formated, if null or ommited, will use current system time
formatNumber(number)
Format a number to make it more readable (e.g transforms 9999 to 9,999)
numbernumber to be formated
readJSON(filepath)
Safe load a JSON file and parse it, if file doesn't exists, or if it fails to parse the json(bad json), it will return an emptry json.
filepathobvious, the filepath..
SplitArray(Array, MaxSize)
Split a big array, into another array of arrays
ArrayArray to be splitedMaxSizeMax size of each array to be splited
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago