Add instance creation helper ⭐
Introducing Refinery
🏭 a helper class for creating instances of types:
@JvmInline
value class Name private constructor(private val value: String) {
companion object : Refinery<String, Name>() {
override fun Refinement<String>.refine() = filter { it.isNotBlank() }.map { Name(it) }
}
}
val grog = Name.fromOrThrow("Grog") // returns a Name instance "Grog"
val void = Name.fromOrThrow("") // throws RefinementException
Add Arrow support ⭐
A new module krefty-arrow
was created to support working with Either
type
Deprecate Predicate ⏳
Removing Predicate
support in favour of (T) -> Boolean
Remove Refined 🛑
Refined
was completely replaced by Refinement