Helpers

object Helpers

Functions

Link copied to clipboard
fun String.capitalized(): String
Link copied to clipboard
fun genericNameAdapter(field: KClass<*>, prop: KProperty<*>): String
fun genericNameAdapter(type: KType, clazz: KClass<*>): String

Adapts a class with type parameters into a reference friendly string

Link copied to clipboard
fun KType.getReferenceSlug(): String

fun KClass<*>.getReferenceSlug(prop: KProperty<*>): String

Will build a reference slug that is useful for schema caching and references, particularly in the case of a class with type parameters

Link copied to clipboard
fun KType.getSimpleSlug(): String
fun KClass<*>.getSimpleSlug(prop: KProperty<*>): String
Link copied to clipboard
fun <T> logged(functionName: String, entities: Map<String, Any>, block: () -> T): T

Higher order function that takes a map of names to object and will log their state ahead of function invocation along with the result of the function invocation

Link copied to clipboard
fun String.toNumber(): Number

Properties

Link copied to clipboard
val UNIT_TYPE: KType