@quenty/brio 8.9.0 → 8.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.10.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/brio@8.9.0...@quenty/brio@8.10.0) (2023-04-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add RxBrioUtils.flatCombineLatestBrio(observables, filter) ([9f61007](https://github.com/Quenty/NevermoreEngine/commit/9f61007339a5a937f4bb7a1970ac8426ce012bf0))
12
+
13
+
14
+
15
+
16
+
6
17
  # [8.9.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/brio@8.8.0...@quenty/brio@8.9.0) (2023-04-03)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/brio
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/brio",
3
- "version": "8.9.0",
3
+ "version": "8.10.0",
4
4
  "description": "Brios wrap an object and either are alive or dead",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -33,5 +33,5 @@
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "fa7c7edfd754cf18fd808466121310f9bfff6271"
36
+ "gitHead": "d26d804d1f96e9a0f3f5687f8e024ec9d476172d"
37
37
  }
@@ -349,6 +349,24 @@ function RxBrioUtils.combineLatest(observables)
349
349
  })
350
350
  end
351
351
 
352
+ --[=[
353
+ Flattens all the brios in one brio and combines them, and then switches it to
354
+ a brio so only the last state is valid.
355
+
356
+ @param observables { [any]: Observable<Brio<T>> | Observable<T> | T }
357
+ @param filter function | nil
358
+ @return Observable<Brio<{ [any]: T }>>
359
+ ]=]
360
+ function RxBrioUtils.flatCombineLatestBrio(observables, filter)
361
+ assert(type(observables) == "table", "Bad observables")
362
+
363
+ return RxBrioUtils.flatCombineLatest(observables)
364
+ :Pipe({
365
+ RxBrioUtils.switchToBrio();
366
+ filter and RxBrioUtils.where(filter) or nil
367
+ })
368
+ end
369
+
352
370
  --[=[
353
371
  Flat map equivalent for brios. The resulting observables will
354
372
  be disconnected at the end of the brio.