https://github.com/robstoll/kbox
Utility library for Kotlin
https://github.com/robstoll/kbox
kotlin kotlin-multiplatform utilities
Last synced: 17 days ago
JSON representation
Utility library for Kotlin
- Host: GitHub
- URL: https://github.com/robstoll/kbox
- Owner: robstoll
- License: apache-2.0
- Created: 2017-01-22T18:21:59.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-03-20T14:29:02.000Z (about 1 month ago)
- Last Synced: 2025-04-05T07:27:14.120Z (25 days ago)
- Topics: kotlin, kotlin-multiplatform, utilities
- Language: Kotlin
- Size: 1.8 MB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://central.sonatype.com/artifact/ch.tutteli.kbox/kbox/3.1.0)
[](http://opensource.org/licenses/Apache2.0)
[](https://github.com/robstoll/kbox/actions?query=workflow%3AUbuntu+branch%3Amain)
[](https://github.com/robstoll/kbox/actions?query=workflow%3AWindows+branch%3Amain)# KBox
KBox is a very small but useful utility library for Kotlin (JVM, Android and JS) providing functions which are missing
in the stdlib such as:
- [failIf](https://github.com/robstoll/kbox/tree/main/src/commonMain/kotlin/ch/tutteli/kbox/failIf.kt)
- [takeIf](https://github.com/robstoll/kbox/tree/main/src/commonMain/kotlin/ch/tutteli/kbox/takeIf.kt)
- [blankToNull](https://github.com/robstoll/kbox/tree/main/src/commonMain/kotlin/ch/tutteli/kbox/blankToNull.kt)
- [isNotNullAndNotEmpty/Blank](https://github.com/robstoll/kbox/tree/main/src/commonMain/kotlin/ch/tutteli/kbox/isNotNullAndNot.kt)
- [identity](https://github.com/robstoll/kbox/tree/main/src/commonMain/kotlin/ch/tutteli/kbox/identity.kt)
- [Tuple4(Like) - Tuple9(Like)](https://github.com/robstoll/kbox/tree/main/src/commonMain/generated/kotlin/ch/tutteli/kbox)
(including functions mapComponentX, append, glue)
- [Triple/Pair.mapFirst/Second/Third](https://github.com/robstoll/kbox/tree/main/src/commonMain/generated/kotlin/ch/tutteli/kbox/tupleMap.kt#L12)
- [toVararg](https://github.com/robstoll/kbox/tree/main/src/commonMain/generated/kotlin/ch/tutteli/kbox/toVararg.kt), [mapVararg](https://github.com/robstoll/kbox/tree/main/src/commonMain/generated/kotlin/ch/tutteli/kbox/mapVararg.kt), [varargToList (glue)](https://github.com/robstoll/kbox/tree/main/src/commonMain/generated/kotlin/ch/tutteli/kbox/varargToList.kt)and more, see the [Documentation](https://robstoll.github.io/kbox/kdoc/) for a full list.
# Installation
KBox is published to maven central.
```
repositories { mavenCentral() }
dependencies {
implementation("ch.tutteli.kbox:kbox:3.1.0")
}
```# Documentation
Visit [https://robstoll.github.io/kbox/kdoc](https://robstoll.github.io/kbox/kdoc/).
# License
KBox is licensed under [Apache 2.0](http://opensource.org/licenses/Apache2.0).