steamutils 1.5.54 → 1.5.55

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/index.js CHANGED
@@ -21,7 +21,7 @@ import { AppID_CSGO, E1GameBanOnRecord, E1VACBanOnRecord, EActivityType, ECommen
21
21
  import SteamTotp from "steam-totp";
22
22
  import { SteamProto, SteamProtoType } from "./steamproto.js";
23
23
  import EventEmitter from "node:events";
24
- import { extractAssetItemsFromHovers, parseMarketHistoryListings, parseMarketListings, parseSteamProfileXmlToJson, parseUserProfile } from "./parse_html.js";
24
+ import { extractAssetItemsFromHovers, parseMarketHistoryListings, parseMarketListings, parseSteamProfileXmlToJson } from "./parse_html.js";
25
25
 
26
26
  const eventEmitter = (globalThis.steamUserEventEmitter = new EventEmitter());
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.5.54",
3
+ "version": "1.5.55",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",
package/parse_html.js CHANGED
@@ -247,7 +247,7 @@ export function parseMarketListings(html) {
247
247
  * @property {string} tradeBanState
248
248
  * @property {number} isLimitedAccount
249
249
  * @property {string} customURL
250
- * @property {string} memberSince
250
+ * @property {number | null} memberSince
251
251
  * @property {string} steamRating
252
252
  * @property {number} hoursPlayed2Wk
253
253
  * @property {string} headline
@@ -309,11 +309,13 @@ export function parseSteamProfileXmlToJson(xml) {
309
309
  const avatarUrl = profile.avatarFull || profile.avatarMedium || profile.avatarIcon;
310
310
  profile.avatarHash = getAvatarHashFromUrl(avatarUrl);
311
311
 
312
+ const memberSince = profile.memberSince;
313
+ profile.memberSince = null;
312
314
  const formats = ["MMMM DD, YYYY", "MMMM D, YYYY", "MMMM DD", "MMMM D"];
313
315
  for (const format of formats) {
314
- const memberSinceMoment = moment(profile.memberSince, format, true);
316
+ const memberSinceMoment = moment(memberSince, format, true);
315
317
  if (memberSinceMoment.isValid()) {
316
- profile.memberSince = moment(profile.memberSince, format, true).valueOf();
318
+ profile.memberSince = memberSinceMoment.valueOf();
317
319
  break;
318
320
  }
319
321
  }