Zero-dependencies KMP utils and extensions.
- Kotlin 2.3.0
- JDK 11
- Iterable extensions:
forEachLet()Map.filterKeysNotNull()
- Duration extensions:
Duration.msLong.msInt.ms
- String extensions and utils:
generateRandomString()String.wrap()String.takeOrCut()Number.bytesToString()uuid()[js, jvm]
- Declension of endings in Russian words:
endWordForNumWithNumber()Number.endOfWord()
- Idiomatic functions:
letIf()alsoIf()applyIf()
- Infix functions:
notNullorNotNullorNullbothNull
- Others:
Double.format()[js, jvm]Double.round()[js, jvm]orNullIf()ifNotEmpty()Boolean.outcome()
ProgressTracker- A utility class to track and notify progress percentage based on iterations over a set number of elements
- Encryption:
String.hmac()String.hmacSHA256()String.hmacSHA512()randomHexString()String.encryptAesGcm()String.decryptAesGcm()
- Date and Time Utils:
timeZone- property that depends on theTIME_ZONEenvironment variable (or property) or uses the system time zone by default. Use in most of the date and time extensions.now()nowTime()today()yesterday()tomorrow()nowZoned()LocalDateTime.atZone()LocalDate.firstDayOfYear()LocalDate.firstDayOfMonth()LocalDate.lastDayOfYear()LocalDate.atEndOfDay()LocalDate.toDate()LocalDate.lastDayOfMonth()LocalDateTime.startOfDay()LocalDateTime.endOfDay()LocalDateTime.toDate()LocalTime.inPeriod()
- Others:
Charsets.WINDOWS_1251String.capitalize()
PropertiesFactory- Contains factory methods for getting properties from filesString.asResourceStream()String.asResource()
Cacheable- A delegate that persists the value with cache durationSyncDelegate- A delegate that synchronizes access to the valueDelegates.sync()