Comparing version 2.8.1 to 2.8.2
@@ -51,4 +51,4 @@ "use strict"; | ||
name = $('.eventname').text(); | ||
dateStart = Number($('td.eventdate span[data-unix]').first().attr('data-unix')); | ||
dateEnd = Number($('td.eventdate span[data-unix]').last().attr('data-unix')); | ||
dateStart = Number($('td.eventdate span[data-unix]').first().attr('data-unix')) || undefined; | ||
dateEnd = Number($('td.eventdate span[data-unix]').last().attr('data-unix')) || undefined; | ||
prizePool = $('td.prizepool').text(); | ||
@@ -55,0 +55,0 @@ location = { name: $('img.flag').attr('title'), code: parsing_1.popSlashSource($('img.flag')).split('.')[0] }; |
@@ -44,3 +44,3 @@ "use strict"; | ||
return __awaiter(_this, void 0, void 0, function () { | ||
var t$, e$, name, logo, coverImage, location, facebook, twitter, rank, arePlayerPicturesOfficial, playerSelector, playerImageSelector, getPlayerId, players, recentResults, rankingDevelopment, rankings, bigAchievements, mapStatistics, events; | ||
var t$, e$, name, logo, coverImage, location, facebook, twitter, rank, arePlayerPicturesOfficial, playerSelector, playerImageSelector, getPlayerId, players, recentResults, rankingDevelopment, rankings, bigAchievements, mapStatisticsGraphElement, mapStatistics, events; | ||
return __generator(this, function (_b) { | ||
@@ -97,3 +97,6 @@ switch (_b.label) { | ||
}); }); | ||
mapStatistics = mappers_1.getMapsStatistics(t$(t$('.graph').get(1)).attr('data-fusionchart-config')); | ||
mapStatisticsGraphElement = t$(t$('.graph').get(1)); | ||
mapStatistics = mapStatisticsGraphElement.length !== 0 | ||
? mappers_1.getMapsStatistics(mapStatisticsGraphElement.attr('data-fusionchart-config')) | ||
: undefined; | ||
events = mappers_1.toArray(e$('a.big-event')).map(function (eventEl) { return ({ | ||
@@ -100,0 +103,0 @@ name: eventEl.find('.big-event-name').text(), |
@@ -19,4 +19,4 @@ import Team from './Team'; | ||
name: string; | ||
dateStart: number; | ||
dateEnd: number; | ||
dateStart?: number; | ||
dateEnd?: number; | ||
prizePool: string; | ||
@@ -23,0 +23,0 @@ teams: EventTeam[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var index_1 = require("./index"); | ||
index_1.default.getTeam({ id: 6118 }).then(function (res) { return console.dir(res, { depth: null }); }).catch(function (err) { return console.log(err); }); |
{ | ||
"name": "hltv", | ||
"version": "2.8.1", | ||
"version": "2.8.2", | ||
"description": "The unofficial HLTV Node.js API", | ||
@@ -8,6 +8,6 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"prepare": "npm run build", | ||
"prepare": "npm run test && npm run build", | ||
"build": "tsc", | ||
"start": "ts-node src/playground", | ||
"doc": "typedoc --out documentation src" | ||
"test": "jest" | ||
}, | ||
@@ -22,2 +22,16 @@ "repository": "git+https://github.com/gigobyte/HLTV.git", | ||
], | ||
"jest": { | ||
"transform": { | ||
"^.+\\.tsx?$": "ts-jest" | ||
}, | ||
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js", | ||
"jsx", | ||
"json", | ||
"node" | ||
] | ||
}, | ||
"author": "Stanislav Iliev", | ||
@@ -31,6 +45,8 @@ "license": "ISC", | ||
"@types/cheerio": "^0.22.9", | ||
"@types/jest": "^23.3.1", | ||
"@types/request": "^2.47.1", | ||
"@types/socket.io-client": "^1.4.32", | ||
"jest": "^23.5.0", | ||
"ts-jest": "^23.1.4", | ||
"ts-node": "^7.0.0", | ||
"typedoc": "^0.12.0", | ||
"typescript": "^3.0.1" | ||
@@ -37,0 +53,0 @@ }, |
@@ -20,3 +20,6 @@ { | ||
"emitDecoratorMetadata": true | ||
} | ||
}, | ||
"exclude": [ | ||
"__tests__" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
256019
0
8
107
2355