@molochko-dev/data 1.4.35 → 1.4.36
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.
|
@@ -8,7 +8,7 @@ const date_1 = require("../helpers/date");
|
|
|
8
8
|
const filtered = filter(animals, eventType)
|
|
9
9
|
|
|
10
10
|
*/
|
|
11
|
-
class
|
|
11
|
+
class AnimalEventFilter {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.status = enums_1.COW_STATUS;
|
|
14
14
|
this.defaultCowAge = 12;
|
|
@@ -114,8 +114,8 @@ class AnimalEcentFilter {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
const f = new AnimalEventFilter();
|
|
117
118
|
function filter(animals, eventType) {
|
|
118
|
-
const f = new AnimalEcentFilter();
|
|
119
119
|
return f.filter(animals, eventType);
|
|
120
120
|
}
|
|
121
121
|
exports.filter = filter;
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ const filtered = filter(animals, eventType)
|
|
|
8
8
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class AnimalEventFilter {
|
|
12
12
|
status = COW_STATUS;
|
|
13
13
|
defaultCowAge = 12;
|
|
14
14
|
|
|
@@ -139,7 +139,8 @@ class AnimalEcentFilter {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
+
const f = new AnimalEventFilter();
|
|
143
|
+
|
|
142
144
|
export function filter<T extends BaseAnimal>(animals: T[], eventType: EVENT_TYPES_ENUM) {
|
|
143
|
-
const f = new AnimalEcentFilter();
|
|
144
145
|
return f.filter(animals, eventType);
|
|
145
146
|
}
|