form.state → initialFormState TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
initialFormState in TypeScript, one function of this group
1.0.1
ts
40 tests
react.form.form-field → FormField React ^19 · TypeScript only
Wire a label, hint and error message to one form control by id, the accessible way (GOV.UK form group pattern).
FormField in TypeScript, one function of this group
1.0.1
ts
19 tests
react.form.styles React ^19 · TypeScript only
An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.
formStyles in TypeScript
1.0.1
ts
21 tests
react.form.checkbox React ^19 · TypeScript only
One checkbox with its label beside it, such as "I agree to the terms" (GOV.UK single checkbox).
Checkbox in TypeScript
1.0.1
ts
14 tests
react.form.button React ^19 · TypeScript only
A form button in primary, secondary or warning style that stays focusable while loading (GOV.UK button).
Button in TypeScript
1.0.1
ts
13 tests
react.form.fieldset React ^19 · TypeScript only
Group related inputs under a legend, with a hint and error message described to the whole group (GOV.UK fieldset).
Fieldset in TypeScript
1.0.1
ts
10 tests
react.form.radio-group React ^19 · TypeScript only
Choose exactly one of several radios, with item hints, an "or" divider and inline yes/no (GOV.UK radios).
RadioGroup in TypeScript
1.0.1
ts
14 tests
react.form.password-field React ^19 · TypeScript only
A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).
A group of 2: passwordChecklist, PasswordField
1.0.1
ts
22 tests
react.form.select React ^19 · TypeScript only
A labelled drop-down list with a hint, error message and an optional empty first option (GOV.UK select).
Select in TypeScript
1.0.1
ts
15 tests
react.form.checkbox-group React ^19 · TypeScript only
A question answered by ticking any of several checkboxes, with item hints and an exclusive "None" (GOV.UK checkboxes).
A group of 2: toggleValue, CheckboxGroup
1.0.1
ts
24 tests
react.form.text-field React ^19 · TypeScript only
A labelled single-line text input with hint, error message, autocomplete, prefix and suffix (GOV.UK text input).
TextField in TypeScript
1.0.1
ts
14 tests
form.character-count
The GOV.UK character count message for a text box: characters or words left or over a limit, with a threshold.
characterCount in TypeScript
1.0.1
py rs ts
32 tests
react.form.date-input React ^19 · TypeScript only
Day, month and year boxes under one legend, with hint, error message and the boxes in error marked (GOV.UK date input).
DateInput in TypeScript
1.0.1
ts
14 tests
react.form.error-summary React ^19 · TypeScript only
A "There is a problem" box linking to each field in error, focused on arrival, built from a validator's fields (GOV.UK).
A group of 2: errorSummaryItems, ErrorSummary
1.0.1
ts
21 tests
form.date-parts
Check a date typed into day, month and year boxes, with GOV.UK's error messages and the boxes to mark in error.
validateDateParts in TypeScript
1.0.1
py rs ts
49 tests
react.form.textarea React ^19 · TypeScript only
A labelled multi-line text box with hint, error and an optional live character or word count (GOV.UK).
Textarea in TypeScript
1.0.1
ts
16 tests
auth.validate-login
Check a login form (email, password): the normalised email to look up, or a message for each field to fix.
validateLogin in TypeScript
1.0.0
py rs ts
11 tests
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validatePasswordChange in TypeScript
1.0.0
py rs ts
15 tests
auth.validate-registration
Validate a sign-up form (email, password, name) in one call, with a message per field, in the browser and the API alike.
validateRegistration in TypeScript
1.0.0
py rs ts
14 tests
todo.item
The to-do item type (Todo, TodoDraft, Recurrence) and its validators, with a message per field.
A group of 2: validateDraft, validateTodo
1.0.0
py rs ts
51 tests
todo.parse-repeat
Read a Repeat box, "every 2 weeks" or "every monday on 2026-10-05", as a todo's recurrence, or null.
parseRepeat in TypeScript
1.0.0
py rs ts
22 tests
todo.parse-tags
Read a tags box as typed, "#Home, work errands", into normalised tags: split on spaces and commas.
parseTags in TypeScript
1.0.0
py rs ts
12 tests
net.ipv6 → formatIpv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
formatIpv6 in TypeScript, one function of this group
1.0.0
py rs ts
47 tests
net.ipv4 → formatIpv4
Parse, format and check dotted-quad IPv4 addresses, refusing leading zeros, octal, hex and short forms.
formatIpv4 in TypeScript, one function of this group
1.0.0
py rs ts
39 tests
net.mac-address
Validate a MAC address in colon, hyphen, Cisco dot or bare form and normalise it, with multicast and local bits.
validateMacAddress in TypeScript
1.0.0
py rs ts
22 tests
validation.isbn
Check an ISBN-10 or ISBN-13 and convert between them; the normalised form is always the ISBN-13.
validateIsbn in TypeScript
1.0.0
py rs ts
19 tests
todo.normalise-tags
Clean up tags as typed: trim, drop the #, lower-case slug form, drop empties and duplicates, keep the order.
normaliseTags in TypeScript
1.0.0
py rs ts
13 tests
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validateJournal in TypeScript
1.0.0
py rs ts
16 tests
auth.bearer-token
The token from an HTTP Authorization header of the form "Bearer <token>" (RFC 6750), or null if it has none.
parseBearerToken in TypeScript
1.0.0
py rs ts
18 tests
validation.gtin
Check an EAN-8, UPC-A, EAN-13 or GTIN-14 barcode number against the GS1 mod-10 check digit.
validateGtin in TypeScript
1.1.0
py rs ts
19 tests
dates.uk-tax-year
The UK personal tax year containing a date: 6 April to 5 April, with HMRC's label.
ukTaxYear in TypeScript
1.0.0
py rs ts
19 tests
encoding.utf8
Text to UTF-8 bytes and strictly back (RFC 3629), so hashing and signing see the same bytes in every language.
A group of 2: utf8Encode, utf8Decode
1.0.0
py rs ts
25 tests
energy.tariff-time-of-use
Cost half-hourly consumption against time-of-use rates: Economy 7 windows or Agile-style half-hourly prices.
timeOfUseCost in TypeScript
1.0.1
py rs ts
24 tests
http.retry-after
Seconds to wait from an HTTP Retry-After header (delay-seconds or an HTTP date), or null if missing or malformed.
retryAfterSeconds in TypeScript
1.0.0
py rs ts
23 tests
math.big-integer
Exact integer arithmetic of any size, on decimal strings, for powers and products that overflow 64 bits.
calculateBigInteger in TypeScript
1.0.0
py rs ts
24 tests
text.normalise-name
Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.
normaliseName in TypeScript
1.0.0
py rs ts
23 tests
time.duration
Parse durations written as 1h30m, 90m or 01:30, add them up in whole minutes, and format the total.
duration in TypeScript
1.0.0
py rs ts
23 tests
validation.bic
Check the format of a SWIFT/BIC code (8 or 11 characters) and split it into its parts.
validateBic in TypeScript
1.0.0
py rs ts
15 tests
validation.phone-e164
Normalise a phone number to E.164 (+447700900123) using a default country's trunk and dialling prefixes.
validatePhoneE164 in TypeScript
2.0.0
py rs ts
31 tests
logistics.hs-code-validate
Check the format of a commodity code: 6-digit HS, 8-digit CN or 10-digit TARIC/UK code, with chapter and heading checks.
validateHsCode in TypeScript
1.0.0
py rs ts
16 tests
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validateDevice in TypeScript
1.0.0
py rs ts
17 tests
text.integer-to-words
Spell out a whole number in British English words, with "and" the way a cheque writes it.
integerToWords in TypeScript
1.0.0
py rs ts
25 tests
auth.normalise-email
Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.
normaliseEmail in TypeScript
1.0.0
py rs ts
12 tests
auth.password-policy
Check a new password against a named policy (NIST SP 800-63B-4 by default): length, common passwords, name and email.
A group of 2: passwordPolicy, checkPassword
1.0.1
py rs ts
31 tests
todo.list
The to-do list reducer: add, edit, complete, remove, clear and reorder todos, each returning a new list.
A group of 8: addTodo, updateTodo, toggleTodo, removeTodo, clearCompleted, toggleAll, moveTodo, toggleAllMode
1.1.0
py rs ts
102 tests
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validateHostname in TypeScript
1.0.0
py rs ts
26 tests
legal.statutory-interest Unreviewed
Statutory interest on a judgment debt (8% simple, daily) or a late commercial debt, England and Wales.
statutoryInterest in TypeScript
1.0.1
py rs ts
19 tests
legal.conflict-name-match Unreviewed
Fuzzy-match a name against existing clients and parties for a conflict check: normalised, token-sorted Jaro-Winkler.
conflictNameMatch in TypeScript
1.0.1
py rs ts
18 tests
validation.nhs-number
Check an NHS number's modulus 11 check digit and normalise it to ten digits.
validateNhsNumber in TypeScript
2.0.0
py rs ts
17 tests
encoding.base64
Bytes to base64 and base64url text and back (RFC 4648), with strict decoding, identically in every language.
A group of 4: base64Encode, base64Decode, base64UrlEncode, base64UrlDecode
1.0.0
py rs ts
46 tests
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
A group of 2: hexEncode, hexDecode
1.0.0
py rs ts
25 tests
net.cidr
CIDR blocks: network, broadcast, first and last host, host count, netmask and prefix, and membership.
A group of 5: cidrInfo, cidrContains, isCidr, prefixToNetmask, netmaskToPrefix
1.0.0
py rs ts
70 tests
todo.parse-date-phrase
Read a typed due date like "tomorrow", "next friday", "in 2 weeks" or "2026-10-01" as a date, relative to today.
parseDatePhrase in TypeScript
1.0.0
py rs ts
53 tests
validation.uk-vat-number
Check a UK VAT registration number against HMRC's mod-97 checksum, including the post-2010 9755 variant.
isUkVatNumber in TypeScript
1.0.0
py rs ts
22 tests
math.round-div-big
Divide two integers of any size with an explicit rounding mode, on decimal strings, for exact money sums past 2^53.
roundDivBig in TypeScript
1.0.0
py rs ts
21 tests
dates.week-number
ISO 8601 week number and week-numbering year of a date: weeks start Monday, week 1 holds the first Thursday.
weekNumber in TypeScript
1.0.0
py rs ts
18 tests
validation.luhn
Check a digit string against the Luhn mod-10 checksum used by payment cards and many identifiers.
isLuhn in TypeScript
1.0.0
py rs ts
18 tests
validation.uk-ni-number
Check a UK National Insurance number's format and HMRC's disallowed prefix letters, and normalise it.
validateUkNiNumber in TypeScript
2.0.0
py rs ts
22 tests
health.nhs-number-format Unreviewed
Display an NHS number in the 3-3-4 format ("943 476 5919") after checking its modulus 11 check digit.
formatNhsNumber in TypeScript
1.0.1
py rs ts
13 tests
construction.concrete-volume
Concrete for slabs, strip footings, pads and round columns: volume to the litre and an order rounded up to 0.1 m³.
concreteVolume in TypeScript
1.0.0
py rs ts
19 tests
validation.uk-company-number
Check a Companies House company number's format and prefix (SC, NI, OC, LP...) and zero-pad it to eight characters.
validateUkCompanyNumber in TypeScript
2.0.1
py rs ts
18 tests
energy.price-cap
Ofgem energy price cap unit rate and daily standing charge for a fuel and payment method on a date (GB average).
priceCap in TypeScript
1.0.2
py rs ts
19 tests
validation.uk-postcode
Validate a UK postcode and normalise it to canonical upper case with one space before the inward code.
validateUkPostcode in TypeScript
2.0.0
py rs ts
26 tests
validation.uk-utr
Check an HMRC Unique Taxpayer Reference's modulus 11 check digit, accepting the K and spacing people type.
validateUkUtr in TypeScript
2.0.1
py rs ts
18 tests
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
A group of 4: parseHex, toHex, srgbToLinear, linearToSrgb
1.0.1
py rs ts
39 tests
agri.fertiliser-application
Fertiliser product rate (kg/ha and total) to meet N, P2O5 and K2O targets from its analysis, limiting nutrient first.
fertiliserApplication in TypeScript
1.0.0
py rs ts
16 tests
agri.field-area
Field area in square metres, hectares and acres from a boundary polygon of latitude/longitude points.
fieldArea in TypeScript
1.0.0
py rs ts
14 tests
auth.access-token
Issue an API's HS256 access token, read one from an Authorization header, and refuse revoked or superseded ones.
A group of 3: issueAccessToken, readAccessToken, confirmAccessToken
1.0.0
py rs ts
33 tests
charts.downsample
Reduce a long series to a few points that keep its visual shape, by Largest-Triangle-Three-Buckets (LTTB).
downsample in TypeScript
1.0.0
py rs ts
11 tests
charts.interpolate-color
The colour at a point along a sequential or diverging ramp, mixed in OKLab so steps look even; hex in, hex out.
interpolateColor in TypeScript
1.0.0
py rs ts
19 tests
math.basis-points
Convert a rate between percent, basis points and a plain ratio exactly, as decimal text or integer basis points.
A group of 3: convertRate, toBasisPoints, fromBasisPoints
2.0.0
py rs ts
45 tests
net.ip-classify
Classify an IPv4 or IPv6 address as loopback, private, link-local, multicast, documentation, CGNAT or global.
classifyIp in TypeScript
1.0.0
py rs ts
34 tests
text.truncate
Shorten text to a maximum length on a word boundary and add an ellipsis, counting Unicode code points.
truncate in TypeScript
1.0.0
py rs ts
18 tests
time.iso-to-unix
An RFC 3339 timestamp with a Z or offset, such as 2026-09-26T13:00:00+01:00, to Unix time in whole seconds.
isoToUnix in TypeScript
1.0.0
py rs ts
20 tests
todo.reschedule-recurrence
When a repeating todo's due date is moved by hand, move its series with it: the new date becomes the anchor.
rescheduleRecurrence in TypeScript
1.0.0
py rs ts
14 tests
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
isEmail in TypeScript
1.0.0
py rs ts
28 tests
validation.iban
Check an IBAN against the ISO 13616 mod-97-10 checksum and the registered length for its country.
isIban in TypeScript
1.0.0
py rs ts
22 tests
validation.lei
Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.
validateLei in TypeScript
1.0.0
py rs ts
14 tests
auth.login-throttle
Allow a login attempt or lock the account out, from its recent failed attempts, with the seconds until it may retry.
loginThrottle in TypeScript
1.0.0
py rs ts
19 tests
dates.bank-holidays
UK bank and public holidays for a region and year, as published by gov.uk, including one-off holidays.
bankHolidays in TypeScript
1.0.1
py rs ts
15 tests
education.weighted-grade
Weighted percentage across coursework and exam components, exact as a fraction, then rounded once.
weightedGrade in TypeScript
1.0.0
py rs ts
22 tests
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltvCac in TypeScript
1.0.0
py rs ts
14 tests
validation.gs1-check-digit
Compute or check the GS1 mod-10 check digit of any GS1 key: GTIN, SSCC, GLN, GSRN, GDTI, GSIN and the rest.
A group of 2: gs1CheckDigit, isGs1CheckDigitValid
1.0.0
py rs ts
30 tests
dates.business-days-between
Working days between two dates, excluding weekends and a caller-supplied holiday list.
businessDaysBetween in TypeScript
1.0.0
py rs ts
26 tests
hospitality.recipe-scale
Scale a recipe to a new number of portions, tidying metric units (g to kg, mL to L) and rounding to kitchen precision.
scaleRecipe in TypeScript
1.0.1
py rs ts
26 tests
auth.password-hash
Hash a password for storage as pbkdf2_sha256$iterations$salt$hash, verify one in constant time, and spot weak hashes.
A group of 3: hashPassword, verifyPassword, passwordNeedsRehash
1.0.0
py rs ts
36 tests
todo.parse-quick-add
Turn one typed line like "Pay rent tomorrow !high #home every month" into a todo draft.
parseQuickAdd in TypeScript
1.0.0
py rs ts
44 tests
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
1.0.2
py rs ts
30 tests
finance.tax.vat-return Unreviewed
UK nine-box VAT return totals for a period from categorised sales and purchases (VAT Notice 700/12).
vatReturn in TypeScript
1.0.1
py rs ts
19 tests
invest.time-weighted-return Unreviewed
Time-weighted return from valuations taken at each external cash flow, geometrically linked exactly.
timeWeightedReturn in TypeScript
1.0.1
py rs ts
22 tests
retail.sales-tax-us Unreviewed
US sales tax on a sale: the state's base rate from dated data plus a local rate the caller supplies.
salesTaxUs in TypeScript
1.1.1
py rs ts
22 tests
health.qrisk-inputs-validate Unreviewed
Check a QRISK3 cardiovascular risk input set against the calculator's published ranges; does not compute risk.
validateQriskInputs in TypeScript
1.0.1
py rs ts
29 tests
charity.donation-matching
Employer match on a donation: a ratio in basis points, limited by a per-donor cap and a programme budget.
donationMatch in TypeScript
1.0.0
py rs ts
17 tests
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in TypeScript
1.0.0
py rs ts
17 tests
construction.roof-pitch
Roof pitch in degrees, rafter length and roof slope area from span, rise and length.
roofPitch in TypeScript
1.0.0
py rs ts
15 tests
manufacturing.bom-explode
Explode a multi-level bill of materials into exact total quantities per component, with scrap and cycle checks.
explodeBom in TypeScript
1.0.0
py rs ts
17 tests
education.fee-instalments
Tuition fee instalment schedule from a total, shares and due dates, exact to the penny.
feeInstalments in TypeScript
1.0.0
py rs ts
20 tests
manufacturing.bom-cost
Rolled-up standard cost of one unit of a product from its BOM, bought-in costs, and labour and overhead rates.
bomCost in TypeScript
1.0.0
py rs ts
15 tests
logistics.container-fit
How many identical cartons fit in a 20ft, 40ft or 40ft high-cube container or a 13.6 m trailer, by space and by weight.
containerFit in TypeScript
1.0.0
py rs ts
16 tests
manufacturing.yield-scrap
Whole units to start for a required good output at a process yield, and the scrap that allows for.
inputForYield in TypeScript
1.0.0
py rs ts
15 tests