@quenty/rx 7.12.0 → 7.13.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
+ # [7.13.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rx@7.12.0...@quenty/rx@7.13.0) (2023-07-15)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add Rx.onlyAfterDefer() ([c23de79](https://github.com/Quenty/NevermoreEngine/commit/c23de79145d1069236e15e972c932373913854b9))
12
+
13
+
14
+
15
+
16
+
6
17
  # [7.12.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/rx@7.11.0...@quenty/rx@7.12.0) (2023-06-17)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/rx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/rx",
3
- "version": "7.12.0",
3
+ "version": "7.13.0",
4
4
  "description": "Quenty's reactive library for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "dc77d6de09e9eb9d3fd6dafd790c052d8393d38f"
43
+ "gitHead": "af7a623f58fe7ec96b47c80e385b71f820fd4cb8"
44
44
  }
package/src/Shared/Rx.lua CHANGED
@@ -1788,6 +1788,28 @@ function Rx.throttleTime(duration, throttleConfig)
1788
1788
  end
1789
1789
  end
1790
1790
 
1791
+ --[=[
1792
+ Only emits events after the deferred first signal.
1793
+
1794
+ @return (source: Observable) -> Observable
1795
+ ]=]
1796
+ function Rx.onlyAfterDefer()
1797
+ return function(observable)
1798
+ return Observable.new(function(sub)
1799
+ local isReady = false
1800
+ task.defer(function()
1801
+ isReady = true
1802
+ end)
1803
+
1804
+ return observable:Subscribe(function(...)
1805
+ if isReady then
1806
+ sub:Fire(...)
1807
+ end
1808
+ end, sub:GetFailComplete())
1809
+ end)
1810
+ end;
1811
+ end
1812
+
1791
1813
  --[=[
1792
1814
  Throttles emission of observables on the defer stack to the last emission.
1793
1815
  @return (source: Observable) -> Observable