==
and !=
JS-0050 29 const tokens = await utils.getTokens();
30 if (!tokens) return null;
31 var matchid = await axios.get(`https://glz-eu-1.eu.a.pvp.net/pregame/v1/players/${tokens.subject}`, {headers: {Authorization: "Bearer " + tokens.accessToken,"X-Riot-Entitlements-JWT": tokens.token,"X-Riot-ClientVersion": "release-03.00-shipping-22-574489","X-Riot-ClientPlatform": "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9"}}).catch(error => {return error})
32 if(matchid.response && matchid.response.status == 400) { 33 tokens = await data()
34 matchid = await axios.get(`https://glz-${settings.region}-1.${settings.region}.a.pvp.net/pregame/v1/players/${tokens.subject}`, {headers: {Authorization: "Bearer " + tokens.accessToken,"X-Riot-Entitlements-JWT": tokens.token,"X-Riot-ClientVersion": "release-03.00-shipping-22-574489","X-Riot-ClientPlatform": "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9"}}).catch(error => {return error})
35 }
47 const tokens = await utils.getTokens();
48 if (!tokens) return null;
49 var matchid = await axios.get(`https://glz-eu-1.eu.a.pvp.net/core-game/v1/players/${tokens.subject}`, {headers: {Authorization: "Bearer " + tokens.accessToken,"X-Riot-Entitlements-JWT": tokens.token,"X-Riot-ClientVersion": "release-03.00-shipping-22-574489","X-Riot-ClientPlatform": "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9"}}).catch(error => {return error})
50 if(matchid.response && matchid.response.status == 400) { 51 tokens = await data()
52 matchid = await axios.get(`https://glz-${settings.region}-1.${settings.region}.a.pvp.net/core-game/v1/players/${tokens.subject}`, {headers: {Authorization: "Bearer " + tokens.accessToken,"X-Riot-Entitlements-JWT": tokens.token,"X-Riot-ClientVersion": "release-03.00-shipping-22-574489","X-Riot-ClientPlatform": "ew0KCSJwbGF0Zm9ybVR5cGUiOiAiUEMiLA0KCSJwbGF0Zm9ybU9TIjogIldpbmRvd3MiLA0KCSJwbGF0Zm9ybU9TVmVyc2lvbiI6ICIxMC4wLjE5MDQyLjEuMjU2LjY0Yml0IiwNCgkicGxhdGZvcm1DaGlwc2V0IjogIlVua25vd24iDQp9"}}).catch(error => {return error})
53 }
53 })
54 if (!presences.data) return null;
55
56 var f = presences.data.presences.filter(item => item.puuid == tokens.subject)57
58 if (!f[0]) return null;
59
It is considered good practice to use the type-safe equality operators ===
and !==
instead of their regular counterparts ==
and !=
.
The strict equality operators (===
and !==
) use the strict equality comparison algorithm to compare two operands.
false
.true
only if they refer to the same object.null
or both operands are undefined
, return true
.NaN
, return false
.+0
and -0
are considered to be the same value.true
or both false
.The most notable difference between this operator and the equality (==
) operator is that if the operands are of different types, the ==
operator attempts to convert them to the same type before comparing.
a == b
foo == true
bananas != 1
value == undefined
typeof foo == 'undefined'
'hello' != 'world'
0 == 0
true == true
foo == null
a === b
foo === true
bananas !== 1
value === undefined
typeof foo === 'undefined'
'hello' !== 'world'
0 === 0
true === true
foo === null