This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Feature List
Sven Fehler edited this page Oct 28, 2019
·
25 revisions
Name | Description | Return Type | Since Version |
---|---|---|---|
isEmpty() | Checks if a variable is empty | Boolean | 1.4.0 |
isArrayEmpty() | Checks if an array is empty | Boolean | 1.5.0 |
error() | Sends an error message to the console, optionally to a file and/or exits the process | void | 1.5.0 |
allEqual() | Tests whether or not all items of an array are equal | Boolean | 1.5.0 |
softShutdown() | Executes a function before process shutdown | void | 1.5.0 |
noShudown() | Prevents the process from being exited | void | 1.5.0 |
yesShutdown() | Allows the process to be exited if previously prevented by jsl.noShutdown()
|
void | 1.6.0 |
readableArray() | Converts an array to a better readable one | Array | 1.7.0 |
mapRange() | Transforms a value to a different numerical range | Number | 1.8.0 |
unused() | Indicates an unused variable to a linter | void | 1.8.0 |
replaceAt() | Replaces a character in a string with a different string | String | 1.8.0 |
randRange() | Generates highly randomized numbers from a set numerical range | Number | 1.5.0 |
randomizeArray() | Randomizes all items in an array | Array | 1.8.0 |
seededRNG .generateSeededNumbers() |
Generates a set of random numbers based on a seed (same seed = same numbers) | Object | 1.8.0 |
seededRNG .generateRandomSeed() |
Generates a random seed to be used in generateSeededNumbers()
|
Number | 1.8.0 |
seededRNG .validateSeed() |
Checks if a seed is valid | Boolean | 1.8.0 |
generateUUID .hexadecimal() |
Generates a randomized UUID in hexadecimal format | String | 1.5.0 |
generateUUID .decimal() |
Generates a randomized UUID in decimal format | String | 1.8.0 |
generateUUID .alphanumerical() |
Generates a randomized UUID in alphanumerical format | String | 1.8.0 |
generateUUID .binary() |
Generates a randomized UUID in binary format | String | 1.8.0 |
generateUUID .custom() |
Generates a randomized UUID in a custom format | String | 1.8.0 |
ping() | Pings a URL and returns status code, MIME type and response time | Object | 1.6.0 |
downloadFile() | Downloads a file from a URL and sends progress callbacks | void | 1.8.0 |
logger() | Logs a string to a file with an optional timestamp | void | 1.5.0 |
readdirRecursive() | Asynchronously reads a directory and its subdirectories recursively | Array | 1.7.0 |
readdirRecursiveSync() | Just like readdirRecursive() , but synchronous |
Array | 1.7.0 |
Name | Description | Since Version |
---|---|---|
ProgressBar | Creates a progress bar in the command line (console) | 1.7.0 |
MenuPrompt | Creates an interactive menu in the command line (console) | 1.8.0 |
Name | Description | Since Version |
---|---|---|
info | This object contains information about JSLib, like the version, the contributors, the documentation URL and more | 1.5.0 |
colors | This object can be used to add color to the console output. Is especially useful with template literals | 1.8.0 |