form.state → initialFormState TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
Not available in Python
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).
Not available in Python
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.
Not available in Python
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).
Not available in Python
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).
Not available in Python
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).
Not available in Python
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).
Not available in Python
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).
Not available in Python
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).
Not available in Python
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).
Not available in Python
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).
Not available in Python
1.0.1
ts
14 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).
Not available in Python
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).
Not available in Python
1.0.1
ts
21 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.
character_count in Python
1.0.1
py rs ts
32 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.
validate_date_parts in Python
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).
Not available in Python
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.
validate_login in Python
1.0.0
py rs ts
11 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.
validate_registration in Python
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: validate_draft, validate_todo
1.0.0
py rs ts
51 tests
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validate_password_change in Python
1.0.0
py rs ts
15 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.
parse_repeat in Python
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.
parse_tags in Python
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.
format_ipv6 in Python, 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.
format_ipv4 in Python, 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.
validate_mac_address in Python
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.
validate_isbn in Python
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.
normalise_tags in Python
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.
validate_journal in Python
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.
parse_bearer_token in Python
1.0.0
py rs ts
18 tests
dates.uk-tax-year
The UK personal tax year containing a date: 6 April to 5 April, with HMRC's label.
uk_tax_year in Python
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: utf8_encode, utf8_decode
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.
time_of_use_cost in Python
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.
retry_after_seconds in Python
1.0.0
py rs ts
23 tests
text.normalise-name
Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.
normalise_name in Python
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.
validate_bic in Python
1.0.0
py rs ts
15 tests
validation.gtin
Check an EAN-8, UPC-A, EAN-13 or GTIN-14 barcode number against the GS1 mod-10 check digit.
validate_gtin in Python
1.1.0
py rs ts
19 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.
validate_hs_code in Python
1.0.0
py rs ts
16 tests
math.big-integer
Exact integer arithmetic of any size, on decimal strings, for powers and products that overflow 64 bits.
calculate_big_integer in Python
1.0.0
py rs ts
24 tests
text.integer-to-words
Spell out a whole number in British English words, with "and" the way a cheque writes it.
integer_to_words in Python
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.
normalise_email in Python
1.0.0
py rs ts
12 tests
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validate_device in Python
1.0.0
py rs ts
17 tests
time.duration
Parse durations written as 1h30m, 90m or 01:30, add them up in whole minutes, and format the total.
duration in Python
1.0.0
py rs ts
23 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: password_policy, check_password
1.0.1
py rs ts
31 tests
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validate_hostname in Python
1.0.0
py rs ts
26 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: add_todo, update_todo, toggle_todo, remove_todo, clear_completed, toggle_all, move_todo, toggle_all_mode
1.1.0
py rs ts
102 tests
validation.phone-e164
Normalise a phone number to E.164 (+447700900123) using a default country's trunk and dialling prefixes.
validate_phone_e164 in Python
2.0.0
py rs ts
31 tests
legal.conflict-name-match Unreviewed
Fuzzy-match a name against existing clients and parties for a conflict check: normalised, token-sorted Jaro-Winkler.
conflict_name_match in Python
1.0.1
py rs ts
18 tests
legal.statutory-interest Unreviewed
Statutory interest on a judgment debt (8% simple, daily) or a late commercial debt, England and Wales.
statutory_interest in Python
1.0.1
py rs ts
19 tests
validation.nhs-number
Check an NHS number's modulus 11 check digit and normalise it to ten digits.
validate_nhs_number in Python
2.0.0
py rs ts
17 tests
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
A group of 2: hex_encode, hex_decode
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: cidr_info, cidr_contains, is_cidr, prefix_to_netmask, netmask_to_prefix
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.
parse_date_phrase in Python
1.0.0
py rs ts
53 tests
encoding.base64
Bytes to base64 and base64url text and back (RFC 4648), with strict decoding, identically in every language.
A group of 4: base64_encode, base64_decode, base64_url_encode, base64_url_decode
1.0.0
py rs ts
46 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.
round_div_big in Python
1.0.0
py rs ts
21 tests
validation.uk-vat-number
Check a UK VAT registration number against HMRC's mod-97 checksum, including the post-2010 9755 variant.
is_uk_vat_number in Python
1.0.0
py rs ts
22 tests
dates.week-number
ISO 8601 week number and week-numbering year of a date: weeks start Monday, week 1 holds the first Thursday.
week_number in Python
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.
is_luhn in Python
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.
validate_uk_ni_number in Python
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.
format_nhs_number in Python
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³.
concrete_volume in Python
1.0.0
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.
validate_uk_postcode in Python
2.0.0
py rs ts
26 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).
price_cap in Python
1.0.2
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.
validate_uk_company_number in Python
2.0.1
py rs ts
18 tests
validation.uk-utr
Check an HMRC Unique Taxpayer Reference's modulus 11 check digit, accepting the K and spacing people type.
validate_uk_utr in Python
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: parse_hex, to_hex, srgb_to_linear, linear_to_srgb
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.
fertiliser_application in Python
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.
field_area in Python
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: issue_access_token, read_access_token, confirm_access_token
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 Python
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.
interpolate_color in Python
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: convert_rate, to_basis_points, from_basis_points
2.0.0
py rs ts
45 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.
iso_to_unix in Python
1.0.0
py rs ts
20 tests
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
is_email in Python
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.
is_iban in Python
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.
validate_lei in Python
1.0.0
py rs ts
14 tests
dates.bank-holidays
UK bank and public holidays for a region and year, as published by gov.uk, including one-off holidays.
bank_holidays in Python
1.0.1
py rs ts
15 tests
net.ip-classify
Classify an IPv4 or IPv6 address as loopback, private, link-local, multicast, documentation, CGNAT or global.
classify_ip in Python
1.0.0
py rs ts
34 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.
login_throttle in Python
1.0.0
py rs ts
19 tests
dates.business-days-between
Working days between two dates, excluding weekends and a caller-supplied holiday list.
business_days_between in Python
1.0.0
py rs ts
26 tests
education.weighted-grade
Weighted percentage across coursework and exam components, exact as a fraction, then rounded once.
weighted_grade in Python
1.0.0
py rs ts
22 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.
reschedule_recurrence in Python
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: gs1_check_digit, is_gs1_check_digit_valid
1.0.0
py rs ts
30 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.
scale_recipe in Python
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: hash_password, verify_password, password_needs_rehash
1.0.0
py rs ts
36 tests
subscriptions.ltv-cac
Customer lifetime value, LTV to CAC ratio and CAC payback months from ARPA, gross margin, churn and CAC.
ltv_cac in Python
1.0.0
py rs ts
14 tests
text.truncate
Shorten text to a maximum length on a word boundary and add an ellipsis, counting Unicode code points.
truncate in Python
1.0.0
py rs ts
18 tests
todo.parse-quick-add
Turn one typed line like "Pay rent tomorrow !high #home every month" into a todo draft.
parse_quick_add in Python
1.0.0
py rs ts
44 tests
finance.tax.vat-return Unreviewed
UK nine-box VAT return totals for a period from categorised sales and purchases (VAT Notice 700/12).
vat_return in Python
1.0.1
py rs ts
19 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.
income_tax in Python
1.0.2
py rs ts
30 tests
invest.time-weighted-return Unreviewed
Time-weighted return from valuations taken at each external cash flow, geometrically linked exactly.
time_weighted_return in Python
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.
sales_tax_us in Python
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.
validate_qrisk_inputs in Python
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.
donation_match in Python
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 Python
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.
roof_pitch in Python
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.
explode_bom in Python
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.
fee_instalments in Python
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.
bom_cost in Python
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.
container_fit in Python
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.
input_for_yield in Python
1.0.0
py rs ts
15 tests