Package kweb.util

Types

KWebDSL
Link copied to clipboard
annotation class KWebDSL
NotFoundException
Link copied to clipboard
data class NotFoundException(message: String) : Exception
Stack
Link copied to clipboard
open class Stack(prefix: String?)
This is the base stack object used in the compiled io.kweb.util.Template.
Template
Link copied to clipboard
class Template(template: String, replaceables: String) : Stack
A fast, lightweight string templating system with zero dependencies.

Functions

combine
Link copied to clipboard
fun <A, B> Pair<KVar<A>, KVar<B>>.combine(): KVar<Pair<A, B>>
createNonce
Link copied to clipboard
fun createNonce(length: Int = 6): String
escapeEcma
Link copied to clipboard
fun String.escapeEcma(): String
pruneAndDumpStackTo
Link copied to clipboard
fun Array<StackTraceElement>.pruneAndDumpStackTo(logStatementBuilder: StringBuilder)
Dump a stacktrace generated by a user-supplied lambda, but attempt to remove irrelevant lines to the trace.
warnIfBlocking
Link copied to clipboard
fun <T> warnIfBlocking(maxTimeMs: Long, onBlock: (Thread) -> Unit, f: () -> T): T

Properties

json
Link copied to clipboard
val String.json: JsonPrimitive
json
Link copied to clipboard
val Number.json: JsonPrimitive
json
Link copied to clipboard
val Boolean.json: JsonPrimitive
pathQueryFragment
Link copied to clipboard
val URL.pathQueryFragment: String
pkg
Link copied to clipboard
val <T : Any> KClass<T>.pkg: String
random
Link copied to clipboard
val random: Random
Created by ian on 1/7/17.
scheduledExecutorService
Link copied to clipboard
val scheduledExecutorService: ScheduledExecutorService