Functional Weave
Code in TypeScript

Capabilities for no framework · unreviewed

Ordered by level: primitives at the bottom of the graph, workflows at the top. Each one carries its own tests, at least 8 per function.

Unreviewed: rules (tax, payroll, legal, clinical and the like) that pass their tests in every language but await sign-off by a qualified expert. Treat them as drafts.

Suites — the capabilities a kind of app is built from: accounting, payroll, an online shop, a clinic…

Integrations — sign-in, payments, email, uploads: I/O behind one interface and several providers, with declared secrets and contract tests that run offline.

Collection: React form elements — accessible form components for React, and the pure helpers they use.

Level 0 primitive

health.age-in-months Unreviewed
Age in completed months and days on a given date, for paediatric charts and doses; month ends handled like birthdays.
ageInMonths in TypeScript

Level 1 generic concept

payroll.tax-code-parse Unreviewed
Parse a UK PAYE tax code (1257L, K475, BR, D0, NT, 0T, S and C prefixes, W1/M1/X) into its allowance and flags.
parseTaxCode in TypeScript
health.egfr Unreviewed
eGFR in mL/min/1.73 m² by the race-free CKD-EPI 2021 creatinine equation, from creatinine in µmol/L or mg/dL.
egfrCkdEpi2021 in TypeScript

Level 2 domain function

finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
vatRate in TypeScript
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
addVat in TypeScript
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
removeVat in TypeScript
invest.bond-yield Unreviewed
Current yield and yield to maturity of a fixed-coupon bond from its clean price, as Excel's YIELD defines it.
bondYield in TypeScript
property.stamp-duty Unreviewed
Stamp duty on a property purchase: SDLT (England, NI), LBTT (Scotland), LTT (Wales), with reliefs and surcharges.
stampDuty in TypeScript
payroll.income-tax Unreviewed
PAYE income tax for one pay period from a tax code, cumulative or week 1/month 1, by HMRC's tax table routines.
incomeTax in TypeScript
invest.fee-drag Unreviewed
What an annual charge costs an investment over the years: value with and without the fee, year by year, in minor units.
feeDrag in TypeScript
payroll.tax-period Unreviewed
The UK PAYE tax week, tax month and payroll period number that a pay date falls in, weeks 53, 54 and 56 included.
taxPeriod in TypeScript

Level 3 business operation