v0.8.2 #80
@ -16,6 +16,7 @@
|
||||
|
||||
### Fixed
|
||||
- Partially fixed a bug with `MutableMeta` observable wrappers.
|
||||
- `valueSequence` now include root value. So `meta.update` works properly.
|
||||
|
||||
### Security
|
||||
|
||||
|
@ -8,7 +8,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "space.kscience"
|
||||
version = "0.7.2-dev-1"
|
||||
version = "0.7.2-dev-2"
|
||||
}
|
||||
|
||||
subprojects {
|
||||
|
@ -188,10 +188,12 @@ public operator fun <M : TypedMeta<M>> M?.get(key: String): M? = this?.get(key.p
|
||||
|
||||
|
||||
/**
|
||||
* Get a sequence of [Name]-[Value] pairs using top-down traversal of the tree
|
||||
* Get a sequence of [Name]-[Value] pairs using top-down traversal of the tree.
|
||||
* The sequence includes root value with empty name
|
||||
*/
|
||||
public fun Meta.valueSequence(): Sequence<Pair<Name, Value>> = sequence {
|
||||
items.forEach { (key, item) ->
|
||||
value?.let { yield(Name.EMPTY to it) }
|
||||
item.value?.let { itemValue ->
|
||||
yield(key.asName() to itemValue)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user