Skip to content

Commit

Permalink
Added the new kits function for checking null pointer and upgraded th…
Browse files Browse the repository at this point in the history
…e version. 🍷
  • Loading branch information
pokk committed Jan 23, 2018
1 parent a28ddf1 commit 01cb027
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ allprojects {
And add our dependency to your app `bundle.gradle`.

```gradle
implementation 'com.devrapid.jieyi:kotlinknifer:1.1.6'
implementation 'com.devrapid.jieyi:kotlinknifer:1.1.7'
```

Then you can use it!!!
Expand All @@ -55,7 +55,7 @@ Then you can use it!!!
<dependency>
<groupId>com.devrapid.jieyi</groupId>
<artifactId>kotlinknifer</artifactId>
<version>1.1.6</version>
<version>1.1.7</version>
<type>pom</type>
</dependency>
```
Expand All @@ -70,7 +70,7 @@ Then you can use it!!!
If you'd not like to use them to your project, you can add the exclude as like below

```gradle
implementation('com.devrapid.jieyi:kotlinknifer:1.1.6', {
implementation('com.devrapid.jieyi:kotlinknifer:1.1.7', {
exclude group: 'io.reactivex.rxjava2', module: 'rxjava'
exclude group: 'io.reactivex.rxjava2', module: 'rxkotlin'
exclude group: 'com.google.code.gson', module: 'gson'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ proj_name=kotlinknifer
proj_libname=KotlinKnifer
proj_group=com.devrapid.jieyi
proj_artifactid=kotlinknifer
proj_version=1.1.6
proj_version=1.1.7
proj_description=For developing an Android conveniently and rapidly.
proj_websiteurl=https://github.com/pokk/KotlinKnifer
proj_issuetrackerurl=https://github.com/pokk/KotlinKnifer/issues
Expand Down
4 changes: 4 additions & 0 deletions kotlinknifer/src/main/java/com/devrapid/kotlinknifer/Kits.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ inline infix fun (() -> Unit).iff(condition: Any?): Any? {
else -> condition?.let { this() }
}
}

inline fun Any?.isNull() = null == this

inline fun Any?.isNotNull() = null != this

0 comments on commit 01cb027

Please sign in to comment.