steamutils 1.3.51 → 1.3.52

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.
@@ -0,0 +1,14 @@
1
+ import SteamClient from "./SteamClient.js";
2
+
3
+ (async function () {
4
+ const steamClient = new SteamClient({
5
+ cookie: "steamLoginSecure=76561199408140539%7C%7CeyAidHlwIjogIkpXVCIsICJhbGciOiAiRWREU0EiIH0.eyAiaXNzIjogInI6MUEwRl8yM0Y3MTMxRF83MDdCQSIsICJzdWIiOiAiNzY1NjExOTk0MDgxNDA1MzkiLCAiYXVkIjogWyAid2ViIiwgIm1vYmlsZSIgXSwgImV4cCI6IDE3MDg3MzkyNjEsICJuYmYiOiAxNzAwMDEyMDAwLCAiaWF0IjogMTcwODY1MjAwMCwgImp0aSI6ICIwRUYxXzIzRkVENzg5X0EyMkE2IiwgIm9hdCI6IDE3MDgwODcxMDgsICJydF9leHAiOiAxNzI2MTk0MDQ2LCAicGVyIjogMCwgImlwX3N1YmplY3QiOiAiMTQuMTkxLjE2Ny4yMDEiLCAiaXBfY29uZmlybWVyIjogIjE0LjE5MS4xNjcuMjAxIiB9.OwQczS3Ey_twA27KGtOdx3kRimOfWLDkuRgfOtjl3ZmHAv_qYtwO6x2PGZtaQFyE75rSEzN-aUW_WjYDAOdRCQ;sessionid=165fb1e643efb54f7dc81557",
6
+ isAutoPlay: true,
7
+ // password: "VitGa_23",
8
+ // twoFactorCode: "99B9G",
9
+ });
10
+ steamClient.onEvent("csgoOnline", function (data) {
11
+ console.log(data);
12
+ });
13
+ steamClient.init();
14
+ })();
package/string.js DELETED
@@ -1,96 +0,0 @@
1
- String.prototype.substringAfter = function (delimiter) {
2
- const index = this.indexOf(delimiter)
3
- if (index === -1) {
4
- return this
5
- }
6
- return this.substring(index + delimiter.length)
7
- }
8
-
9
- String.prototype.substringAfterOrNull = function (delimiter) {
10
- const index = this.indexOf(delimiter)
11
- if (index === -1) {
12
- return null
13
- }
14
- return this.substring(index + delimiter.length)
15
- }
16
-
17
- String.prototype.substringBefore = function (delimiter) {
18
- const index = this.indexOf(delimiter)
19
- if (index === -1) {
20
- return this
21
- }
22
- return this.substring(0, index)
23
- }
24
-
25
- String.prototype.substringBeforeOrNull = function (delimiter) {
26
- const index = this.indexOf(delimiter)
27
- if (index === -1) {
28
- return null
29
- }
30
- return this.substring(0, index)
31
- }
32
-
33
- String.prototype.substringBeforeLast = function (delimiter) {
34
- const index = this.lastIndexOf(delimiter)
35
- if (index === -1) {
36
- return this
37
- }
38
- return this.substring(0, index)
39
- }
40
-
41
- String.prototype.substringBeforeLastOrNull = function (delimiter) {
42
- const index = this.lastIndexOf(delimiter)
43
- if (index === -1) {
44
- return null
45
- }
46
- return this.substring(0, index)
47
- }
48
-
49
- String.prototype.substringAfterLast = function (delimiter) {
50
- const index = this.lastIndexOf(delimiter)
51
- if (index === -1) {
52
- return this
53
- }
54
- return this.substring(index + delimiter.length)
55
- }
56
-
57
- String.prototype.substringAfterLastOrNull = function (delimiter) {
58
- const index = this.lastIndexOf(delimiter)
59
- if (index === -1) {
60
- return null
61
- }
62
- return this.substring(index + delimiter.length)
63
- }
64
-
65
- String.prototype.removePrefix = function (prefix) {
66
- if (!this.startsWith(prefix)) {
67
- return this
68
- }
69
- return this.substring(prefix.length, this.length)
70
- }
71
-
72
- String.prototype.removeSuffix = function (suffix) {
73
- if (!this.endsWith(suffix)) {
74
- return this
75
- }
76
- return this.substring(0, this.length - suffix.length)
77
- }
78
-
79
- String.prototype.removeSurrounding = function (_fix) {
80
- return this.removePrefix(_fix).removeSuffix(_fix)
81
- }
82
-
83
- String.prototype.substringBetween = function (prefix, suffix) {
84
- return this.substringAfter(prefix).substringBefore(suffix)
85
- }
86
-
87
- String.prototype.substringBetweenOrNull = function (prefix, suffix) {
88
- let text = this
89
-
90
- text = text.substringAfterOrNull(prefix)
91
- if (text === null) return null
92
-
93
- text = text.substringBeforeOrNull(suffix)
94
- if (text === null) return null
95
- return text
96
- }