steamutils 1.3.3 → 1.3.5

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.
Files changed (3) hide show
  1. package/SteamClient.js +16 -16
  2. package/index.js +2 -7
  3. package/package.json +1 -1
package/SteamClient.js CHANGED
@@ -1786,10 +1786,10 @@ function SteamClient({
1786
1786
  offAutoGamePlay,
1787
1787
  updateAutoGamePlay,
1788
1788
  getFriendsList,
1789
- setIsPartyRegister(_isPartyRegister) {
1790
- _isPartyRegister = !!_isPartyRegister
1791
- if (isPartyRegister !== isPartyRegister) {
1792
- isPartyRegister = _isPartyRegister
1789
+ setIsPartyRegister(change) {
1790
+ change = !!change
1791
+ if (isPartyRegister !== change) {
1792
+ isPartyRegister = change
1793
1793
  if (!isPartyRegister) {
1794
1794
  doClearInterval('autoPartyRegister')
1795
1795
  } else {
@@ -1797,24 +1797,24 @@ function SteamClient({
1797
1797
  }
1798
1798
  }
1799
1799
  },
1800
- setAutoPlay(_isAutoPlay) {
1801
- _isAutoPlay = !!_isAutoPlay
1802
- if (isAutoPlay !== _isAutoPlay) {
1803
- isAutoPlay = _isAutoPlay
1800
+ setAutoPlay(change) {
1801
+ change = !!change
1802
+ if (isAutoPlay !== change) {
1803
+ isAutoPlay = change
1804
1804
  updateAutoGamePlay()
1805
1805
  }
1806
1806
  },
1807
- setFakeGameScore(_isFakeGameScore) {
1808
- _isFakeGameScore = !!_isFakeGameScore
1809
- if (isFakeGameScore !== _isFakeGameScore) {
1810
- isFakeGameScore = _isFakeGameScore
1807
+ setFakeGameScore(change) {
1808
+ change = !!change
1809
+ if (isFakeGameScore !== change) {
1810
+ isFakeGameScore = change
1811
1811
  updateFakeGameScore()
1812
1812
  }
1813
1813
  },
1814
- setAutoRequestFreeLicense(_isAutoRequestFreeLicense) {
1815
- _isAutoRequestFreeLicense = !!_isAutoRequestFreeLicense
1816
- if (isAutoRequestFreeLicense !== _isAutoRequestFreeLicense) {
1817
- isAutoRequestFreeLicense = _isAutoRequestFreeLicense
1814
+ setAutoRequestFreeLicense(change) {
1815
+ change = !!change
1816
+ if (isAutoRequestFreeLicense !== change) {
1817
+ isAutoRequestFreeLicense = change
1818
1818
  updateAutoRequestFreeLicense()
1819
1819
  }
1820
1820
  },
package/index.js CHANGED
@@ -13,7 +13,6 @@ import {Header, request} from './axios.js'
13
13
  import {getTableHasHeaders, table2json} from './cheerio.js'
14
14
  import {getJSObjectFronXML} from './xml2json.js'
15
15
  import axios from 'axios'
16
- import url from 'url'
17
16
  import * as cheerio from 'cheerio'
18
17
  import fs from "fs";
19
18
  import FormData from "form-data";
@@ -5029,7 +5028,7 @@ class SteamUser {
5029
5028
  })
5030
5029
  let s = null
5031
5030
  try {
5032
- s = url.parse(href).query.split('&').map(q => q.split('=')).find(q => q[0] === 's')[1]
5031
+ s = URL.parse(href).query.split('&').map(q => q.split('=')).find(q => q[0] === 's')[1]
5033
5032
  } catch (e) {
5034
5033
  }
5035
5034
  if (!s) return {
@@ -5863,11 +5862,7 @@ class SteamUser {
5863
5862
 
5864
5863
  static parseTradeURL(tradeURL) {
5865
5864
  try {
5866
- let search = new URL(tradeURL).search;
5867
- if(search.startsWith("?")){
5868
- search = search.substring(1)
5869
- }
5870
- const tradeURLParams = search.split('&').reduce((accumulator, currentValue, index) => ({
5865
+ const tradeURLParams = URL.parse(tradeURL).query.split('&').reduce((accumulator, currentValue, index) => ({
5871
5866
  ...accumulator, [currentValue.split('=')[0]]: currentValue.split('=')[1]
5872
5867
  }), {})
5873
5868
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.3.03",
3
+ "version": "1.3.05",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",