Skip to content

Commit f130982

Browse files
authored
Update README.md
1 parent f61361c commit f130982

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# KtxSafe
22
Kotlin functions and extensions to do safe unwrap and functions.
3+
## Add dependencies
4+
- Project `build.gradle`
5+
```
6+
allprojects {
7+
repositories {
8+
...
9+
maven { url 'https://jitpack.io' }
10+
}
11+
}
12+
```
13+
- Module `build.gradle`
14+
```
15+
dependencies {
16+
implementation 'com.github.jeziellago:ktxsafe:VERSION'
17+
}
18+
```
319

420
## Nullable values
521
Handle multiples nullable values on conditions is hard and decrease readability in binary conditions.
@@ -81,4 +97,4 @@ val result = tryOrNull { doSomething() }
8197
or
8298
```kotlin
8399
val result = tryOrNull({ /* log exception */ }, { doSomething() })
84-
```
100+
```

0 commit comments

Comments
 (0)