steamutils 1.3.28 → 1.3.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/SteamClient.js +14 -0
  2. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -193,6 +193,19 @@ function SteamClient({
193
193
  })
194
194
  }
195
195
 
196
+
197
+ function offEvent(name) {
198
+ if (Array.isArray(events[name])) {
199
+ for (const eventElement of events[name]) {
200
+ if (eventElement.timeout) {
201
+ clearTimeout(eventElement.timeout)
202
+ }
203
+ }
204
+ }
205
+
206
+ delete events[name]
207
+ }
208
+
196
209
  function onAnyEvent(callback) {
197
210
  onAnyCallbacks.push(callback)
198
211
  }
@@ -1904,6 +1917,7 @@ function SteamClient({
1904
1917
  return steamClient?._logOnDetails
1905
1918
  },
1906
1919
  onEvent,
1920
+ offEvent,
1907
1921
  offAllEvent,
1908
1922
  setPersona(state, name) {
1909
1923
  steamClient.setPersona(state, name)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.28",
3
+ "version": "1.3.30",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.5",