steamutils 1.2.79 → 1.2.81

Sign up to get free protection for your applications and to get access to all the features.
package/SteamClient.js CHANGED
@@ -443,7 +443,7 @@ function SteamClient({
443
443
 
444
444
 
445
445
  function bindEvent() {
446
- const events = {
446
+ const _events = {
447
447
  async disconnected(eresult, msg) {
448
448
  state = 'Offline'
449
449
  log('disconnected', eresult, msg)
@@ -1139,7 +1139,7 @@ function SteamClient({
1139
1139
  }
1140
1140
  }
1141
1141
 
1142
- const chatEvents = {
1142
+ const _chatEvents = {
1143
1143
  async friendMessage(data) {
1144
1144
  if (!data) return
1145
1145
  data.message_no_bbcode = data.message_no_bbcode?.replaceAll(`ː`, `:`)
@@ -1225,12 +1225,13 @@ function SteamClient({
1225
1225
  }
1226
1226
  }
1227
1227
 
1228
- for (const name in events) {
1229
- steamClient.on(name, events[name])
1228
+
1229
+ for (const [name, _event] of Object.entries(_events)) {
1230
+ steamClient.on(name, _event)
1230
1231
  }
1231
1232
 
1232
- for (const name in chatEvents) {
1233
- steamClient.chat.on(name, chatEvents[name])
1233
+ for (const [name, _event] of Object.entries(_chatEvents)) {
1234
+ steamClient.chat.on(name, _event)
1234
1235
  }
1235
1236
  }
1236
1237
 
package/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import cheerio from 'cheerio'
2
1
  import {randomBytes} from 'crypto'
3
2
  import sha256 from 'crypto-js/sha256.js'
4
3
  import _ from 'lodash'
@@ -15,7 +14,7 @@ import {getTableHasHeaders, table2json} from './cheerio.js'
15
14
  import {getJSObjectFronXML} from './xml2json.js'
16
15
  import axios from 'axios'
17
16
  import url from 'url'
18
- import * as cheerio from "cheerio";
17
+ import * as cheerio from 'cheerio'
19
18
  import fs from "fs";
20
19
  import FormData from "form-data";
21
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.79",
3
+ "version": "1.2.81",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",