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()andconvert() - 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 | |
infinity.memory | memory |
infinity.mimeType | mimeType |
infinity.noSql | noSql |
infinity.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¶
- infinity.crypto - Shared cryptographic types and enumerations
- infinity.aes256 - AES-256 encryption and decryption
- infinity.bcrypt - Password hashing with bcrypt
- infinity.md5 - MD5 hashing
- infinity.sha256 - SHA-256 hashing
- infinity.sha512 - SHA-512 hashing
- infinity.rsa - RSA encryption and digital signatures
- infinity.random - Random digits and character strings
Data Storage¶
- infinity.database - SQL database connectivity (SQLite, MySQL/MariaDB, PostgreSQL, SQL Server, Oracle, InterBase/Firebird, ODBC, MongoDB and more)
- infinity.noSql - In-memory document store with queries
- infinity.memory - Shared memory cache for multi-threading
- infinity.session - Session management with JWT support
- infinity.vectordb - Vector database for semantic search and AI/ML applications
File System¶
- infinity.file - File operations
- infinity.directory - Directory operations
- infinity.fileName - File path manipulation
- infinity.stream - Stream-based I/O
- infinity.iniFile - INI file configuration
Networking & Communication¶
- infinity.http - HTTP/HTTPS client and server
- infinity.http2 - HTTP/2 and WebSocket server
- infinity.scgi - SCGI server for web server integration
- infinity.smtp - SMTP email client and server
- infinity.pop3 - POP3 email client and server
- infinity.imap4 - IMAP4 email client
- infinity.mail - Email message parsing and composition
Data Processing¶
- infinity.encoding - Character encodings and conversion
- infinity.base64 - Base64 encoding/decoding
- infinity.hex - Hexadecimal encoding/decoding
- infinity.url - URL encoding/decoding
- infinity.quotedPrintable - Quoted-printable encoding
- infinity.zip - ZIP archive operations
- infinity.zlib - ZLIB compression
- infinity.xml - XML parsing and generation
- infinity.html - HTML parsing and conversion
- infinity.template - Template engine
- infinity.regEx - Regular expressions
Image & Document Processing¶
- infinity.image - Image manipulation and processing
- infinity.pdf - PDF rendering, text extraction and manipulation
Search & Indexing¶
- infinity.fts - Full-text search engine
- infinity.vectordb - Vector similarity search for AI/ML
Multi-threading & Scheduling¶
- infinity.thread - Multi-threading support
- infinity.scheduler - Cron-like task scheduling
- infinity.lock - Read/write locks for thread synchronization
- infinity.event - Event system for inter-thread communication
Utilities¶
- infinity.date - Date/time operations with timezone support
- infinity.list - Enhanced array/list functionality
- infinity.mimeType - MIME type detection
- infinity.os - Operating system information
- infinity.process - Process execution and management
- infinity.service - Windows service management
Enumerations¶
- infinity.fileMode - File access modes
- infinity.encoding - Character encodings