Skip to content

API Reference

The API reference lists and describes all namespaces of the INFINITY.JS runtime with their classes, interfaces, functions and enums.

Always Available

The following namespaces are part of the runtime itself. They can be used without loading a module:

  • console - Console and log file output
  • infinity - Core runtime functions (include(), loadModule(), sleep(), terminate(), terminated, version, ...)
  • infinity.current - Paths of the runtime, the main program, the temp folder and the current script
  • infinity.os - Operating system information
  • infinity.event - Event queue for the communication between threads
  • infinity.lock - Named read/write locks for thread synchronization
  • infinity.encoding - Character encodings (enum) and the functions toString() and convert()
  • infinity.fileMode - File access modes (enum)

Modules

All other namespaces are provided by runtime modules. Load a module with infinity.loadModule() before you use its namespaces:

infinity.loadModule('infinity.crypto');
let hash = infinity.sha256.hash('text', infinity.crypto.outputFormat.hex);

Some modules provide more than one namespace:

Module Namespaces
infinity.crypto crypto, aes256, bcrypt, md5, sha1 (hmac() only), sha256, sha512, rsa, random
infinity.database database
infinity.date date
infinity.encoding base64, hex, url, quotedPrintable
infinity.fileSystem file, directory, fileName
infinity.fts fts
infinity.html html
infinity.http http
infinity.http2 http2
infinity.image image
infinity.imap4 imap4
infinity.iniFile iniFile
infinity.list list
infinity.mail mail
infinity.memory memory
infinity.mimeType mimeType
infinity.noSql noSql
infinity.pdf pdf
infinity.pop3 pop3
infinity.process process
infinity.regEx regEx
infinity.scgi scgi
infinity.scheduler scheduler
infinity.service service
infinity.session session
infinity.smtp smtp
infinity.stream stream
infinity.template template
infinity.thread thread
infinity.vectordb vectordb
infinity.xml xml
infinity.zip zip
infinity.zlib zlib

Run infinity -listModules to list all modules of your runtime, including the native extensions found in the extensions folder.

Namespaces by Topic

Cryptography

Data Storage

File System

Networking & Communication

Data Processing

Image & Document Processing

Search & Indexing

Multi-threading & Scheduling

Utilities

Enumerations