Skip to content

Commit

Permalink
Link to KDoc documentation in README (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored Apr 2, 2021
1 parent 64c3a4e commit 0e576bf
Showing 1 changed file with 46 additions and 26 deletions.
72 changes: 46 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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(
Expand All @@ -30,7 +30,7 @@ val combined = combine(
}
```

## Logging
## [Logging](https://juullabs.github.io/tuulbox/logging/index.html)

![badge-js]
![badge-jvm]
Expand All @@ -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

Expand All @@ -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]
Expand All @@ -76,15 +76,15 @@ 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]
![badge-jvm]

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 {
Expand All @@ -94,17 +94,17 @@ 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]
![badge-mac]

Utilities for test suites.

### `runTest`
### [`runTest`]

Multiplatform test analogy to `runBlocking`:
Multiplatform test analogy to [`runBlocking`]:

```kotlin
@Test
Expand All @@ -113,7 +113,7 @@ fun exampleUnitTest() = runTest {
}
```

### `assertContains`
### [`assertContains`]

```kotlin
assertContains(
Expand All @@ -129,7 +129,7 @@ assertContains(
)
```

### `assertSimilar`
### [`assertSimilar`]

```kotlin
assertSimilar(
Expand All @@ -139,15 +139,15 @@ assertSimilar(
)
```

## Encoding
## [Encoding](https://juullabs.github.io/tuulbox/encoding/index.html)

![badge-js]
![badge-jvm]
![badge-mac]

Utilities for working with binary data.

### `IntBitSet`
### [`IntBitSet`]

```kotlin
val bitSet = 0.bits
Expand All @@ -168,7 +168,7 @@ bitSet[2] // false
bitSet[3] // true
```

### `LongBitSet`
### [`LongBitSet`]

```kotlin
/* | Index | ... | 3 | 2 | 1 | 0 |
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0e576bf

Please sign in to comment.