Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Functions

Sven Fehler edited this page Apr 16, 2020 · 29 revisions

« Home 🏠

These are all the functions of JSLib:

Miscellaneous:

  • jsl.isEmpty()

    Checks whether or not a variable is considered "empty" (equal to null, undefined, an empty string or an object with length = 0).

  • jsl.isArrayEmpty()

    Does the same check as jsl.isEmpty(), but on every item of an array.

  • jsl.error()

    Logs a colored error message to the console and/or to a file and optionally exits the process.

  • jsl.allEqual()

    Tests an array on whether or not all items are equal.

  • jsl.softShutdown()

    Synchronously executes a function before the process shuts down.

  • jsl.noShutdown()

    Prevents the process from being exited normally.

  • jsl.yesShutdown()

    Allows the process to be shut down again if previously disabled by jsl.noShutdown().

  • jsl.readableArray()

    Stringifies an array and makes it better readable.

  • jsl.mapRange()

    Transforms a value of one numerical range to a value of another numerical range.

  • jsl.unused()

    Indicates an unused variable to a linter without modifying the variable.

  • jsl.replaceAt()

    Replaces a character at the specified index of a string with another string.

Randomization:

Network Stuff:

File System: