1.0.26 • Published 4 years ago
@breedr/animals-filter v1.0.26
Animals Filter
Installation
To install the latest version run:
yarn add @breedr/animals-filterUsage
Package has function 
animalsFilter
which has 2 params: animals and filterOptions. 
Animal should have:
type Animal = {
  passportNumber: string;
  isRegulatorySynced: boolean;
  isWithdrawal?: boolean;
  isMale: boolean;
  group: {
    id: string;
  };
  field: {
    id: string;
  };
  animalBreeds: {
    id: string;
  }[];
  lastWeight: {
    value: string;
    date: string;
  } | null;
  currentWeight: string | null;
  deliveryDate: string | null;
  dob: string | null;
  estimatedWeightOn: string | null;
  estimatedAgeOn: string | null;
  growthRate: number | null;
  lastRegulatorySyncedDate: string | null;
};filterOptions has:
type FilterOptions = {
  isSynced: boolean; // Mobile
  sex: "" | "M" | "F";
  groups: string[];
  fields: string[];
  breeds: string[];
  minWeight: string;
  maxWeight: string;
  search?: string;
  deliveryDateTo: string;
  deliveryDateFrom: string;
  minAge: string;
  maxAge: string;
  isMale: boolean;
  isRegulatorySynced?: string; // Web
  isWithdrawal?: string;
  minDeliveryWeight: string;
  maxDeliveryWeight: string;
  maxDeliveryAge: string;
  minDeliveryAge: string;
  minCurrentEstWeight?: string;
  maxCurrentEstWeight?: string;
  daysSinceLastWeightFrom?: string;
  daysSinceLastWeightTo?: string;
  growthRateFrom?: string;
  growthRateTo?: string;
  lastSyncedDateFrom?: string;
  lastSyncedDateTo?: string;
};1.0.26
4 years ago
1.0.25
4 years ago
1.0.24
5 years ago
1.0.23
5 years ago
1.0.22
5 years ago
1.0.21
5 years ago
1.0.20
5 years ago
1.0.19
5 years ago
1.0.18
5 years ago
1.0.17
5 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.11
6 years ago
1.0.12
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago