Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-15 08:39:07 +04:00
parent 90fea21f17
commit 1841d77c4c
13 changed files with 57 additions and 347 deletions

View file

@ -0,0 +1,11 @@
package com.tangem.utils.extensions
fun <K, V, R> Map<K, V>.mapNotNullValues(transform: (Map.Entry<K, V>) -> R?): Map<K, R> {
return this
.mapNotNull { entry ->
val newValue = transform(entry) ?: return@mapNotNull null
entry.key to newValue
}
.toMap()
}