steamutils 1.5.14 → 1.5.16
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +3129 -3129
- package/index.js +7969 -7949
- package/package.json +1 -1
- package/remote.js +9 -0
- package/utils.js +15 -0
package/package.json
CHANGED
package/remote.js
CHANGED
@@ -2246,4 +2246,13 @@ export default class RemoteSteamUser {
|
|
2246
2246
|
};
|
2247
2247
|
return await doRequest(config);
|
2248
2248
|
}
|
2249
|
+
static async getFaceItFinderSteamId(url) {
|
2250
|
+
const { __params, __cookies } = formatParams([url]);
|
2251
|
+
const config = {
|
2252
|
+
method: "getFaceItFinderSteamId",
|
2253
|
+
params: __params,
|
2254
|
+
is_static: true,
|
2255
|
+
};
|
2256
|
+
return await doRequest(config);
|
2257
|
+
}
|
2249
2258
|
}
|
package/utils.js
CHANGED
@@ -1217,3 +1217,18 @@ export function formatFriendState(data) {
|
|
1217
1217
|
rich_presence,
|
1218
1218
|
};
|
1219
1219
|
}
|
1220
|
+
|
1221
|
+
export function getGameDetailScore(scoreString) {
|
1222
|
+
if (typeof scoreString !== "string") {
|
1223
|
+
return null;
|
1224
|
+
}
|
1225
|
+
const regex = /\[\s*(\d+)\s*:\s*(\d+)\s*\]/;
|
1226
|
+
const matches = scoreString.match(regex);
|
1227
|
+
if (matches) {
|
1228
|
+
// The first capturing group (matches[1]) is the first score, the second (matches[2]) is the second score
|
1229
|
+
const score1 = matches[1];
|
1230
|
+
const score2 = matches[2];
|
1231
|
+
return [score1, score2].map(Number);
|
1232
|
+
}
|
1233
|
+
// console.log("No match found", scoreString);
|
1234
|
+
}
|