From 0e576bf5350e5549fbbff7581cec63225fe4b2ad Mon Sep 17 00:00:00 2001 From: Travis Wyatt Date: Fri, 2 Apr 2021 12:47:43 -0700 Subject: [PATCH] Link to KDoc documentation in README (#51) --- README.md | 72 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 9fe837ea..7c8a944a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Toolbox of utilities/helpers for Kotlin development. -## Coroutines +## [Coroutines](https://juullabs.github.io/tuulbox/coroutines/index.html) ![badge-android] ![badge-js] @@ -14,9 +14,9 @@ Toolbox of utilities/helpers for Kotlin development. Utilities for [Coroutines]. -### `combine` +### [`combine`] -[`combine`] for up to 10 [`Flow`]s: +[`combine`][coroutines-combine] for up to 10 [`Flow`]s: ```kotlin val combined = combine( @@ -30,7 +30,7 @@ val combined = combine( } ``` -## Logging +## [Logging](https://juullabs.github.io/tuulbox/logging/index.html) ![badge-js] ![badge-jvm] @@ -40,13 +40,13 @@ Simple multiplatform logging API. ### Initialization -Logging can be initialized via: +Logging can be initialized via [`install`]: ```kotlin Log.dispatcher.install(ConsoleLogger) ``` -Custom loggers can be created by implementing the `Logger` interface. +Custom loggers can be created by implementing the [`Logger`] interface. ### Log @@ -56,18 +56,18 @@ Log message can be logged via: Log.verbose { "Example" } ``` -The following log level functions are available: -- `verbose` -- `debug` -- `info` -- `warn` -- `error` -- `assert` +The following [log level] functions are available: +- [`verbose`] +- [`debug`] +- [`info`] +- [`warn`] +- [`error`] +- [`assert`] Optional `tag` and `throwable` may be provided. `tag` defaults to an autogenerated value, but behavior can be customized -via `Log.tagGenerator` property. +via [`Log.tagGenerator`] property. -## Functional +## [Functional](https://juullabs.github.io/tuulbox/functional/index.html) ![badge-js] ![badge-jvm] @@ -76,7 +76,7 @@ via `Log.tagGenerator` property. Utilities for manipulating functions. For a full functional ecosystem, complete with `Monad` and the like, prefer [Arrow](https://arrow-kt.io/). -## Temporal +## [Temporal](https://juullabs.github.io/tuulbox/temporal/index.html) ![badge-android] ![badge-js] @@ -84,7 +84,7 @@ For a full functional ecosystem, complete with `Monad` and the like, prefer [Arr Toolbox of utilities for dates and times, building on [KotlinX DateTime]. -Various interval [`Flow`]s are provided, such as: `instantFlow`, `localDateTimeFlow`, and `localDateFlow`. For example: +Various interval [`Flow`]s are provided, such as: [`instantFlow`], [`localDateTimeFlow`], and [`localDateFlow`]. For example: ```kotlin localDateTimeFlow().collect { @@ -94,7 +94,7 @@ localDateTimeFlow().collect { _Note: Because this is built on top of [KotlinX DateTime], [core library desugaring] must be enabled for Android targets._ -## Test +## [Test](https://juullabs.github.io/tuulbox/test/index.html) ![badge-js] ![badge-jvm] @@ -102,9 +102,9 @@ _Note: Because this is built on top of [KotlinX DateTime], [core library desugar Utilities for test suites. -### `runTest` +### [`runTest`] -Multiplatform test analogy to `runBlocking`: +Multiplatform test analogy to [`runBlocking`]: ```kotlin @Test @@ -113,7 +113,7 @@ fun exampleUnitTest() = runTest { } ``` -### `assertContains` +### [`assertContains`] ```kotlin assertContains( @@ -129,7 +129,7 @@ assertContains( ) ``` -### `assertSimilar` +### [`assertSimilar`] ```kotlin assertSimilar( @@ -139,7 +139,7 @@ assertSimilar( ) ``` -## Encoding +## [Encoding](https://juullabs.github.io/tuulbox/encoding/index.html) ![badge-js] ![badge-jvm] @@ -147,7 +147,7 @@ assertSimilar( Utilities for working with binary data. -### `IntBitSet` +### [`IntBitSet`] ```kotlin val bitSet = 0.bits @@ -168,7 +168,7 @@ bitSet[2] // false bitSet[3] // true ``` -### `LongBitSet` +### [`LongBitSet`] ```kotlin /* | Index | ... | 3 | 2 | 1 | 0 | @@ -274,8 +274,28 @@ limitations under the License. [Coroutines]: https://kotlinlang.org/docs/reference/coroutines-overview.html [KotlinX DateTime]: https://github.com/Kotlin/kotlinx-datetime [core library desugaring]: https://developer.android.com/studio/write/java8-support#library-desugaring -[`combine`]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/combine.html +[coroutines-combine]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/combine.html [`Flow`]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html +[`runBlocking`]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html +[`combine`]: https://juullabs.github.io/tuulbox/coroutines/coroutines/com.juul.tuulbox.coroutines.flow/combine.html +[`Logger`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-logger/index.html +[`install`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-dispatch-logger/install.html +[log level]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/index.html +[`Log.tagGenerator`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/tag-generator.html +[`verbose`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/verbose.html +[`debug`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/debug.html +[`info`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/info.html +[`warn`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/warn.html +[`error`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/error.html +[`assert`]: https://juullabs.github.io/tuulbox/logging/logging/com.juul.tuulbox.logging/-log/assert.html +[`runTest`]: https://juullabs.github.io/tuulbox/test/test/com.juul.tuulbox.test/run-test.html +[`assertContains`]: https://juullabs.github.io/tuulbox/test/test/com.juul.tuulbox.test/assert-contains.html +[`assertSimilar`]: https://juullabs.github.io/tuulbox/test/test/com.juul.tuulbox.test/assert-similar.html +[`IntBitSet`]: https://juullabs.github.io/tuulbox/encoding/encoding/com.juul.tuulbox.encoding/-int-bit-set/index.html +[`LongBitSet`]: https://juullabs.github.io/tuulbox/encoding/encoding/com.juul.tuulbox.encoding/-long-bit-set/index.html +[`instantFlow`]: https://juullabs.github.io/tuulbox/temporal/temporal/com.juul.tuulbox.temporal/instant-flow.html +[`localDateFlow`]: https://juullabs.github.io/tuulbox/temporal/temporal/com.juul.tuulbox.temporal/local-date-flow.html +[`localDateTimeFlow`]: https://juullabs.github.io/tuulbox/temporal/temporal/com.juul.tuulbox.temporal/local-date-time-flow.html [badge-android]: http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat [badge-ios]: http://img.shields.io/badge/platform-ios-CDCDCD.svg?style=flat