elections-types 1.0.6 → 1.0.7
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.
|
@@ -40,7 +40,7 @@ export class Committee {
|
|
|
40
40
|
typeof committee.name === "string" &&
|
|
41
41
|
typeof committee.url === "string" &&
|
|
42
42
|
is_committee_designation(committee.designation) &&
|
|
43
|
-
typeof committee.file_number === "number" &&
|
|
43
|
+
typeof committee.file_number === "number" && !isNaN(committee.file_number) &&
|
|
44
44
|
(committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
|
|
45
45
|
(committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
|
|
46
46
|
(committee.sponsor_committee_ids === undefined || Array.isArray(committee.sponsor_committee_ids) && committee.sponsor_committee_ids.every((committee_id) => typeof committee_id === "string")) &&
|
|
@@ -52,10 +52,10 @@ export class Donation {
|
|
|
52
52
|
return (donation !== undefined &&
|
|
53
53
|
typeof donation.committee_id === "string" &&
|
|
54
54
|
typeof donation.donation_id === "string" &&
|
|
55
|
-
typeof donation.file_number === "number" &&
|
|
55
|
+
typeof donation.file_number === "number" && !isNaN(donation.file_number) &&
|
|
56
56
|
typeof donation.image_number === "string" &&
|
|
57
57
|
typeof donation.receipt_date === "string" &&
|
|
58
|
-
typeof donation.amount === "number" &&
|
|
58
|
+
typeof donation.amount === "number" && !isNaN(donation.amount) &&
|
|
59
59
|
(donation.donor_id === undefined || typeof donation.donor_id === "string") &&
|
|
60
60
|
typeof donation.donor_name === "string" &&
|
|
61
61
|
(donation.donor_prefix === undefined || typeof donation.donor_prefix === "string") &&
|
|
@@ -70,7 +70,7 @@ export class Donation {
|
|
|
70
70
|
typeof donation.donor_address_city === "string" &&
|
|
71
71
|
typeof donation.donor_address_state_id === "string" &&
|
|
72
72
|
typeof donation.donor_address_zip === "string" &&
|
|
73
|
-
typeof donation.donor_aggregate_ytd === "number" &&
|
|
73
|
+
typeof donation.donor_aggregate_ytd === "number" && !isNaN(donation.donor_aggregate_ytd) &&
|
|
74
74
|
typeof donation.memo_text === "string");
|
|
75
75
|
}
|
|
76
76
|
}
|
package/package.json
CHANGED
package/src/types/Committee.ts
CHANGED
|
@@ -48,7 +48,7 @@ export class Committee {
|
|
|
48
48
|
typeof committee.name === "string" &&
|
|
49
49
|
typeof committee.url === "string" &&
|
|
50
50
|
is_committee_designation(committee.designation) &&
|
|
51
|
-
typeof committee.file_number === "number" &&
|
|
51
|
+
typeof committee.file_number === "number" && !isNaN(committee.file_number) &&
|
|
52
52
|
(committee.principal_committee_ids === undefined || Array.isArray(committee.principal_committee_ids) && committee.principal_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
|
|
53
53
|
(committee.authorized_committee_ids === undefined || Array.isArray(committee.authorized_committee_ids) && committee.authorized_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
|
|
54
54
|
(committee.sponsor_committee_ids === undefined || Array.isArray(committee.sponsor_committee_ids) && committee.sponsor_committee_ids.every((committee_id : any) => typeof committee_id === "string")) &&
|
package/src/types/Donation.ts
CHANGED
|
@@ -57,10 +57,10 @@ export class Donation {
|
|
|
57
57
|
donation !== undefined &&
|
|
58
58
|
typeof donation.committee_id === "string" &&
|
|
59
59
|
typeof donation.donation_id === "string" &&
|
|
60
|
-
typeof donation.file_number === "number" &&
|
|
60
|
+
typeof donation.file_number === "number" && !isNaN(donation.file_number) &&
|
|
61
61
|
typeof donation.image_number === "string" &&
|
|
62
62
|
typeof donation.receipt_date === "string" &&
|
|
63
|
-
typeof donation.amount === "number" &&
|
|
63
|
+
typeof donation.amount === "number" && !isNaN(donation.amount) &&
|
|
64
64
|
(donation.donor_id === undefined || typeof donation.donor_id === "string") &&
|
|
65
65
|
typeof donation.donor_name === "string" &&
|
|
66
66
|
(donation.donor_prefix === undefined || typeof donation.donor_prefix === "string") &&
|
|
@@ -75,7 +75,7 @@ export class Donation {
|
|
|
75
75
|
typeof donation.donor_address_city === "string" &&
|
|
76
76
|
typeof donation.donor_address_state_id === "string" &&
|
|
77
77
|
typeof donation.donor_address_zip === "string" &&
|
|
78
|
-
typeof donation.donor_aggregate_ytd === "number" &&
|
|
78
|
+
typeof donation.donor_aggregate_ytd === "number" && !isNaN(donation.donor_aggregate_ytd) &&
|
|
79
79
|
typeof donation.memo_text === "string"
|
|
80
80
|
)
|
|
81
81
|
}
|