Why Parsing US Bank CSVs and Parliamentary Quorum Math Are Harder Than They Look (Two Zero-Dependency JS Libraries)
Two unglamorous problems waste thousands of hours every January: cleaning messy bank exports for tax prep and verifying quorum & motion vote thresholds during annual board, HOA, and shareholder meetings. Both look trivi
Two unglamorous problems waste thousands of hours every January: cleaning messy bank exports for tax prep and verifying quorum & motion vote thresholds during annual board, HOA, and shareholder meetings.
Both look trivial on paper ("just split by comma!" / "just divide by two!"), and both break constantly in production because of real-world legacy quirks. Today I open-sourced two zero-dependency ES module utilitiesβbank-statement-xlsx-js and quorum-vote-calc-jsβalongside free browser-local web tools that run 100% client-side with zero uploads.
Part 1: Four Real-World US Bank CSV Quirks That Break Naive Parsers
If you build bookkeeping toolsβor just double-click a bank CSV in Excel before tax seasonβyou immediately hit four classic format traps:
-
Chase Checking puts
DetailsbeforeDescription: Chase's header starts withDetails,Posting Date,Description,Amount,...whereDetailsonly saysDEBITorCREDIT. A naive column detector checkingaliases.some(...)in column order grabs column 0 (Details) instead of column 2 (Description). Matching header aliases in priority order (descriptionbeforedetails) eliminates the bug cleanly. -
Bank of America prepends 5β6 summary rows: Raw BofA CSVs begin with
Beginning balance,Total credits,Total debits, and a blank row before the actualDate,Description,Amount,Running Bal.header. Scanning the first 20 non-empty rows for a valid header signature lets users drop unmodified exports straight from the portal. -
Wells Fargo ships completely headerless CSVs: Comma-delimited downloads start immediately on row 1 with
"01/04/2026","-128.40","*","","AWS CLOUD SERVICES". Detecting a valid date in column 0 and monetary value in column 1 lets a parser synthesize column labels automatically. -
American Express flips credit card signs: Amex exports purchases as positive (
+128.40) and payments/refunds as negative (-605.85)βthe opposite of checking accounts. Adding an explicitinvertSignsflag turns Amex exports into consistent Debits and Credits without spreadsheet gymnastics. -
Formula injection: Any merchant memo starting with
=,+,-, or@should be escaped with a leading apostrophe before writing.csvor.xlsxcells.
- Open-source library (MIT, zero deps): github.com/huangyifei1216/bank-statement-xlsx-js
-
Browser-local tools (zero uploads, real
.xlsxwith=SUM()formulas):
Part 2: Three Parliamentary Quorum & Vote Math Traps in Corporate/HOA Software
Every annual-meeting season, secretaries and developers stumble on three subtle math distinctions under Robert's Rules of Order and corporate statutes:
-
Simple majority (
> 50%) on an even board: For a 10-seat board, 5 is half, not a majority. Simple majority is strictlyMath.floor(n / 2) + 1 = 6. -
Abstentions flip outcomes depending on two words in the bylaws:
- Under Robert's Rules default ("majority of votes cast"), a
5 Yes / 4 No / 2 Abstainvote passes (5 > 4, abstentions excluded). - Under "majority of members present", the denominator becomes
11(5 + 4 + 2), requiring6Yes votesβso the exact same5 / 4 / 2vote fails, and every abstention acts like a No vote.
- Under Robert's Rules default ("majority of votes cast"), a
-
Shareholder quorum is weighted by outstanding voting shares, not headcount: Treasury shares are excluded from the denominator, Delaware DGCL Β§216 sets a statutory floor of
1/3(Math.ceil(shares / 3)), and broker non-votes typically count toward quorum only when a routine item appears on the ballot.
- Open-source library (MIT, zero deps): github.com/huangyifei1216/quorum-vote-calc-js
- Free browser-local calculators (with copy-paste minutes certifications):
Both libraries run with node --test and zero npm dependencies. Pull requests for additional international bank CSV formats or state HOA quorum quirks are always welcome!
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.