kompendium
2.0.1

# Helpers

object Helpers
Content copied to clipboard

## Functions

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

Adapts a class with type parameters into a reference friendly string

getReferenceSlug
Link copied to clipboard
fun KType . getReferenceSlug (): String
Content copied to clipboard
fun KClass <*>. getReferenceSlug (prop: KProperty <*>): String
Content copied to clipboard

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

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

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

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

## Properties

UNIT_TYPE
Link copied to clipboard
val UNIT_TYPE : KType
Content copied to clipboard