neonailol / kactoos

General-purpose collection of OOP primitives for Kotlin

Home Page:https://kactoos.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kactoos.

Build Status Build status Jitpack Active Contributors Code Volume Coding Hours Efficiency Utilization

Reworked to Kotlin version of Cactoos

Usage

Kactoos intended to be used as drop-in replacement for Cactoos, this statement backed by compatibility tests

Examples

Write to file, read it contents, and compare it with original

val temp = Files.createTempFile("kactoos-1", "txt-1")
val identical = Equals(
    {
        TextOf(
            TeeInput(
                InputOf(
                    BytesOf(
                        TextOf("Hello, world!")
                    )
                ),
                WriterAsOutput(
                    WriterTo(temp)
                )
            )
        ).asString()
    },
    { "Hello, world!" }
).invoke()

Purpose

Target platforms other than jvm, specifically kotlin-js and kotlin-native

Some implementation notes

  • Do no use @JvmOverloads and default arguments in functions and constructors as it's not portable

About

General-purpose collection of OOP primitives for Kotlin

https://kactoos.netlify.com/

License:MIT License


Languages

Language:Kotlin 99.9%Language:Ruby 0.1%