Skip to content

kotools/types

Repository files navigation

Kotools Types

Kotools Types Embedded Kotlin Kotlin language kotlinx.serialization

JVM Platform JS Platform Linux x64 Platform macOS x64 Platform macOS arm64 Platform MinGW x64 Platform

"Kool Types for Kotlin Multiplatform." - @jmfayard

Unlock the true potential of Kotlin's type system across Kotlin/JVM, Kotlin/JS, and Kotlin Native platforms with Kotools Types – your comprehensive toolkit for explicit type handling!

🚀 Introduction

Kotools Types is not just a library; it's your gateway to seamless and expressive type manipulation in Kotlin projects. Dive into a world where types are your allies, providing clarity, safety, and flexibility across diverse Kotlin platforms.

⭐️ Key Features

  • Unified Type Handling: Embrace a unified approach to handling types across platforms, ensuring consistency in your Kotlin/JVM, Kotlin/JS, and Kotlin Native projects.
  • Enhanced Type Safety: Fortify your code with explicit types, catching errors at compile time to create robust and reliable applications.
  • Automatic Serialization: Seamlessly serialize and deserialize types using kotlinx.serialization, making data interchange between platforms, APIs, databases and libraries a breeze.

🛠️ Installation

You can add Kotools Types to your project by using Gradle or Maven. Just replace the $version or the ${kotools.types.version} variables by the latest version or by another one available in the changelog.

Gradle - Kotlin DSL
implementation("org.kotools:types:$version")
Gradle - Groovy DSL
implementation "org.kotools:types:$version"
Maven
<dependencies>
    <dependency>
        <groupId>org.kotools</groupId>
        <artifactId>types</artifactId>
        <version>${kotools.types.version}</version>
    </dependency>
</dependencies>

See the dedicated documentation for serializing types from the org.kotools.types package using the kotlinx.serialization library.

🎨 Included types

Explore some of the types offered by this library:

  • NotBlankString ensuring that your strings have at least one character excluding whitespaces.
  • PositiveInt representing an integer number of type Int that is greater than or equals zero.
  • NotEmptyList for grouping your data in a list with at least one element.

See the API reference for more types!

📝 Documentation

Here's additional documentation for learning more about this project:

🤝 Community

Join our thriving community! Connect, share insights, and collaborate with fellow developers to make Kotools Types even more powerful.

📣 Show Your Support

If you find this project valuable, show your support by giving us a ⭐️ on GitHub. Your feedback and engagement mean the world to us!

🚧 Contributing

As an Open-Source project, Kotools Types is in need of new contributors! We have issues suited for all levels, from entry to advanced. All are welcome in this project.

If you are looking to contribute, check out our contribution guidelines for more details on how to get started.

🙏 Acknowledgements

Thanks to Loïc Lamarque for creating and sharing this project with the open source community.

Thanks to all the people that ever contributed through code or other means such as bug reports, feature suggestions and so on.

📄 License

This project is licensed under the MIT License.


Happy coding with Kotools Types! 🎉