playball 3.1.2 → 3.1.3

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.
@@ -11,12 +11,15 @@ const formatPitcherName = pitcher => {
11
11
  return display;
12
12
  };
13
13
  const formatTeam = (teams, probables, boxscore, homeAway) => {
14
- const pitcherId = probables[homeAway].id;
14
+ var _probables$homeAway;
15
+ const pitcherId = (_probables$homeAway = probables[homeAway]) === null || _probables$homeAway === void 0 ? void 0 : _probables$homeAway.id;
15
16
  const pitcher = boxscore[homeAway].players['ID' + pitcherId];
16
17
  let lines = [teams[homeAway].teamName, `(${teams[homeAway].record.wins}-${teams[homeAway].record.losses})`];
17
18
  if (pitcher) {
18
19
  var _pitcher$seasonStats, _pitcher$seasonStats2, _pitcher$seasonStats3, _pitcher$seasonStats4;
19
20
  lines = lines.concat(['', formatPitcherName(pitcher), `${(_pitcher$seasonStats = pitcher.seasonStats) === null || _pitcher$seasonStats === void 0 || (_pitcher$seasonStats = _pitcher$seasonStats.pitching) === null || _pitcher$seasonStats === void 0 ? void 0 : _pitcher$seasonStats.wins}-${(_pitcher$seasonStats2 = pitcher.seasonStats) === null || _pitcher$seasonStats2 === void 0 || (_pitcher$seasonStats2 = _pitcher$seasonStats2.pitching) === null || _pitcher$seasonStats2 === void 0 ? void 0 : _pitcher$seasonStats2.losses}`, `${(_pitcher$seasonStats3 = pitcher.seasonStats) === null || _pitcher$seasonStats3 === void 0 || (_pitcher$seasonStats3 = _pitcher$seasonStats3.pitching) === null || _pitcher$seasonStats3 === void 0 ? void 0 : _pitcher$seasonStats3.era} ERA ${(_pitcher$seasonStats4 = pitcher.seasonStats) === null || _pitcher$seasonStats4 === void 0 || (_pitcher$seasonStats4 = _pitcher$seasonStats4.pitching) === null || _pitcher$seasonStats4 === void 0 ? void 0 : _pitcher$seasonStats4.strikeOuts} K`]);
21
+ } else {
22
+ lines = lines.concat(['TBD']);
20
23
  }
21
24
  return lines;
22
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playball",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "Watch MLB games from the comfort of your terminal",
5
5
  "keywords": [
6
6
  "MLB",