steamutils 1.3.28 → 1.3.30
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/SteamClient.js +14 -0
- 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)
|