Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hltv

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hltv - npm Package Compare versions

Comparing version 2.20.2 to 2.20.3

3

lib/endpoints/getEvent.js

@@ -63,3 +63,4 @@ "use strict";

name: teamEl.find('.logo').attr('title'),
id: Number(parsing_1.popSlashSource(teamEl.find('.logo'))),
id: Number(teamEl.find('.team-name a').attr('href').split('/')[2]) ||
undefined,
reasonForParticipation: teamEl.find('.sub-text').text().trim() || undefined,

@@ -66,0 +67,0 @@ rankDuringEvent: Number(teamEl.find('.event-world-rank').text().replace('#', '')) ||

@@ -70,13 +70,13 @@ "use strict";

hasScorebot = $('#scoreboardElement').length !== 0;
teamEls = $('div.teamName');
team1 = teamEls.first().text()
teamEls = $('div.teamsBox div.team');
team1 = teamEls.first().find('div.teamName').first().text()
? {
name: teamEls.eq(0).text(),
id: Number(parsing_1.popSlashSource(teamEls.first().prev()))
name: teamEls.first().find('div.teamName').first().text(),
id: Number(teamEls.first().find('a').first().attr('href').split('/')[2])
}
: undefined;
team2 = teamEls.last().text()
team2 = teamEls.last().find('div.teamName').first().text()
? {
name: teamEls.eq(1).text(),
id: Number(parsing_1.popSlashSource(teamEls.last().prev()))
name: teamEls.last().find('div.teamName').first().text(),
id: Number(teamEls.last().find('a').first().attr('href').split('/')[2])
}

@@ -83,0 +83,0 @@ : undefined;

@@ -56,13 +56,13 @@ "use strict";

$ = _a.sent();
liveMatches = mappers_1.toArray($('.liveMatch .a-reset')).map(function (matchEl) {
var id = Number(matchEl.attr('href').split('/')[2]);
var teamEls = matchEl.find('img.matchTeamLogo');
liveMatches = mappers_1.toArray($('.liveMatch-container')).map(function (matchEl) {
var id = Number(matchEl.find('.a-reset').attr('href').split('/')[2]);
var teamNameEls = matchEl.find('.matchTeamName');
var stars = 5 - matchEl.find('.matchRating i.faded').length;
var team1 = {
name: teamEls.first().attr('title'),
id: Number(parsing_1.popSlashSource(teamEls.first())) || undefined
name: teamNameEls.first().text(),
id: Number(matchEl.attr('team1')) || undefined
};
var team2 = {
name: teamEls.last().attr('title'),
id: Number(parsing_1.popSlashSource(teamEls.last())) || undefined
name: teamNameEls.last().text(),
id: Number(matchEl.attr('team2')) || undefined
};

@@ -76,3 +76,3 @@ var format = matchEl.find('.matchMeta').text();

});
upcomingMatches = mappers_1.toArray($('.upcomingMatch ')).map(function (matchEl) {
upcomingMatches = mappers_1.toArray($('.upcomingMatch')).map(function (matchEl) {
var link = matchEl.find('.a-reset');

@@ -90,4 +90,3 @@ var id = Number(link.attr('href').split('/')[2]);

name: matchEl.find('.team1 .matchTeamName').text(),
id: Number(parsing_1.popSlashSource(matchEl.find('.team1 .matchTeamLogo'))) ||
undefined
id: Number(matchEl.attr('team1')) || undefined
};

@@ -97,6 +96,3 @@ team2 = {

matchEl.find('.team2 .team').text(),
id: matchEl.find('.team2 .matchTeamLogo').length
? Number(parsing_1.popSlashSource(matchEl.find('.team2 .matchTeamLogo'))) ||
undefined
: undefined
id: Number(matchEl.attr('team2')) || undefined
};

@@ -103,0 +99,0 @@ event = {

@@ -51,3 +51,2 @@ "use strict";

exports.getMatchStats = void 0;
var parsing_1 = require("../utils/parsing");
var mappers_1 = require("../utils/mappers");

@@ -92,3 +91,3 @@ exports.getMatchStats = function (config) { return function (_a) {

team1 = {
id: Number(parsing_1.popSlashSource(m$('.team-left .team-logo'))),
id: Number(m$('.team-left a.block').attr('href').split('/')[3]),
name: m$('.team-left .team-logo').attr('title'),

@@ -98,3 +97,3 @@ score: matchScore[0]

team2 = {
id: Number(parsing_1.popSlashSource(m$('.team-right .team-logo'))),
id: Number(m$('.team-right a.block').attr('href').split('/')[3]),
name: m$('.team-right .team-logo').attr('title'),

@@ -101,0 +100,0 @@ score: matchScore[1]

@@ -75,7 +75,9 @@ "use strict";

var team1 = {
id: Number(parsing_1.popSlashSource(matchEl.find('img.team-logo').first())),
id: Number(parsing_1.popSlashSource(matchEl.find('img.team-logo').first())) ||
undefined,
name: matchEl.find('div.team').first().text()
};
var team2 = {
id: Number(parsing_1.popSlashSource(matchEl.find('img.team-logo').last())),
id: Number(parsing_1.popSlashSource(matchEl.find('img.team-logo').last())) ||
undefined,
name: matchEl.find('div.team').last().text()

@@ -82,0 +84,0 @@ };

{
"name": "hltv",
"version": "2.20.2",
"version": "2.20.3",
"description": "The unofficial HLTV Node.js API",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc