1.9.7 • Published 3 years ago

azul-helper v1.9.7

Weekly downloads
67
License
MIT
Repository
github
Last release
3 years ago

Azul Helper

Some functions that may help you somehow

npm version npm downloads dependencies license

Prerequisites

I recommend to try this only in node V10/LTS or above.

Installing

npm install azul-helper

License

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 await or then
  • Thats all folks!

Methods

sleep(ms)

Returns a promise that is solved after ms miliseconds, good to use await or then

  • ms time in miliseconds

isURL(str)

Checks if str is a valid valid url, by returning true or false

  • str desired string to do the magic

isTradeOfferURL(str)

Checks if str is a valid trade offer url, by returning true or false

  • str desired string to do the magic

isValidSteamID(str)

Checks if str is a valid SteamID, by returning true or false

  • str desired string to do the magic

isSteamID64(str)

Checks if str is a valid SteamID64, by returning true or false

  • str desired 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

  • str desired 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.

  • date date 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)

  • number number 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.

  • filepath obvious, the filepath..

SplitArray(Array, MaxSize)

Split a big array, into another array of arrays

  • Array Array to be splited
  • MaxSize Max size of each array to be splited
1.9.7

3 years ago

1.9.6

3 years ago

1.9.5

3 years ago

1.9.4

3 years ago

1.9.2

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.7.0

3 years ago

1.5.2

3 years ago

1.6.0

3 years ago

1.5.1

3 years ago

1.5.6

3 years ago

1.4.6

3 years ago

1.5.0

3 years ago

1.4.7

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago