og-statistics 2.0.2 → 2.0.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "og-statistics",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -105,21 +105,25 @@ card
105
105
  function filterIncidents(incidents) {
106
106
  try {
107
107
 
108
+ const home = incidents.incidents.filter(s => s.isHome === true);
108
109
  const home_cards = filterCards(incidents.incidents, true);
109
110
  const home_goals = filterGoals(incidents.incidents, true);
110
111
  const home_subs = filterSubs(incidents.incidents, true);
111
112
 
113
+ const away = incidents.incidents.filter(s => s.isHome === false);
112
114
  const away_cards = filterCards(incidents.incidents, false);
113
115
  const away_goals = filterGoals(incidents.incidents, false);
114
116
  const away_subs = filterSubs(incidents.incidents, false);
115
117
 
116
118
  return {
117
119
  home: {
120
+ all: home,
118
121
  cards: home_cards,
119
122
  goals: home_goals,
120
123
  subs: home_subs
121
124
  },
122
125
  away: {
126
+ all: away,
123
127
  cards: away_cards,
124
128
  goals: away_goals,
125
129
  subs: away_subs