Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
external class Console : JsAny

JavaScript console class

Link copied to clipboard
open class DOP
Link copied to clipboard
object Env

System env var property delegate.

Link copied to clipboard
@NullMarked
interface Expr
Link copied to clipboard
open class Gatherers
Link copied to clipboard
class Greeting
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class Lang : Record
Link copied to clipboard
interface Platform
Link copied to clipboard
Link copied to clipboard
enum YesNo : Enum<YesNo>

Properties

Link copied to clipboard

Converts a string to camelcase by splitting it by space, dash, underscore, or dot.

Link copied to clipboard
Link copied to clipboard
external val console: Console

JavaScript console object

Link copied to clipboard
Link copied to clipboard

Returns the file size in a human-readable format.

Link copied to clipboard
val <T : Class<*>> T.jarPath: String?

Returns the jar file path of the class

Link copied to clipboard
Link copied to clipboard

Gets the current date and time in the system's default time zone.

Link copied to clipboard
val log: KLogger
Link copied to clipboard

Returns the method name contains this call-site

Link copied to clipboard
expect val platform: Platform
actual val platform: Platform
actual val platform: Platform
actual val platform: Platform
Link copied to clipboard
val <T : Class<*>> T.resourcePath: URL?

Returns the actual class URL

Link copied to clipboard
Link copied to clipboard
val UNSAFE: Unsafe
Link copied to clipboard

Gets the current date and time in UTC timezone.

Link copied to clipboard
Link copied to clipboard

Creates a new coroutine scope that uses Dispatchers.Virtual as its dispatcher.

Functions

Link copied to clipboard
inline fun <T : Event> addPeriodicJFREvent(event: T, crossinline block: T.() -> Unit)

Adds a periodic event to the JFR stream.

Link copied to clipboard
fun ArrayBuffer?.asByteArray(): ByteArray?

Convert JS ArrayBuffer to Kotlin ByteArray

Link copied to clipboard

Returns a human-readable version of the Byte size, where the input represents a specific number of bytes.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun downcallHandle(symbol: String, fdesc: FunctionDescriptor, vararg options: Linker.Option): MethodHandle?
Link copied to clipboard
Link copied to clipboard
fun jvmRuntimeInfo(debug: Boolean = false): String

Returns the runtime information of the JVM and OS.

Link copied to clipboard
suspend fun File.readAsByteArray(): ByteArray?
Link copied to clipboard
suspend fun File.readAsText(): String?
Link copied to clipboard
inline suspend fun <T> runOnVirtualThread(crossinline block: suspend CoroutineScope.() -> T): T

Runs the given suspend block on Dispatchers.Virtual, so that we can call blocking I/O APIs from coroutines

Link copied to clipboard
suspend fun Document.selectFileFromDisk(accept: String? = null, multiple: Boolean = false): List<File>

The code is adapted from compose-multiplatform-file-picker

Link copied to clipboard
fun semaphoreThreadFactory(s: Semaphore, tf: ThreadFactory = Thread.ofVirtual().factory()): ThreadFactory
Link copied to clipboard
fun ArrayBuffer?.toByteArray(): ByteArray?
Link copied to clipboard
fun <T : Class<*>> T.toBytes(): ByteArray?

Read the Class as ByteArray

Link copied to clipboard
fun ClassLoader.using(run: () -> Unit)

Run the lambda in the context of the receiver classloader.

Link copied to clipboard
fun <T> vtLazy(threadSafetyMode: LazyThreadSafetyMode = NONE, initializer: () -> T): Lazy<T>

A virtual thread friendly kotlin.lazy implementation.