Package-level declarations

Properties

Link copied to clipboard
Link copied to clipboard
val Path.extension: String
Link copied to clipboard
val Path.filename: String
Link copied to clipboard
expect val Path.fileSystem: FileSystem
actual val Path.fileSystem: FileSystem

Returns a FakeFileSystem since real filesystem access is unavailable in JS.

actual val Path.fileSystem: FileSystem
actual val Path.fileSystem: FileSystem
actual val Path.fileSystem: FileSystem

Returns a FakeFileSystem since real filesystem access is unavailable in WasmJs.

Link copied to clipboard
Link copied to clipboard
val Path.isFile: Boolean

Functions

Link copied to clipboard

Converts a string to camel case.

Link copied to clipboard
fun Path.encodeToMd5(): String
Link copied to clipboard
inline fun <T> Iterable<*>.firstInstanceOf(): T
Link copied to clipboard
inline fun <T> Iterable<*>.firstInstanceOfOrNull(): T?
Link copied to clipboard
fun String.indented(indentSize: Int): String
Link copied to clipboard

Converts a string to pascal case.

Link copied to clipboard
fun String.prependIndent(indentSize: Int): String

Prepends an indent to the string.

Link copied to clipboard

Removes trailing zeros from a string representing a number.

Link copied to clipboard
Link copied to clipboard
fun String.toLengthFloat(width: Float, height: Float): Float

Some properties on SVG can receive a Number or a percentage. This extension function helps to extract the percentage, in case of present, and transform in the correct float value.

Link copied to clipboard
fun String.toLengthFloatOrNull(width: Float, height: Float): Float?

Converts a string representation of a length to a float value.

Link copied to clipboard

Converts a string to a percentage float value.

Link copied to clipboard

Converts a Float to its string representation, ensuring that whole numbers always include a decimal point (e.g., 10.0 instead of 10).