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
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
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
text.initials
Initials from a personal name for avatars and signatures: "Jean-Paul Sartre" is "JPS".
initials in Python
1.0.0
py rs ts
17 tests
collections.search-text
Filter records by a case-insensitive substring match across named fields, in input order.
search_text in Python
1.0.0
py rs ts
20 tests
text.number-to-words
Write a money amount in words for a cheque: "one thousand two hundred and thirty-four pounds and fifty-six pence".
amount_in_words in Python
1.0.0
py rs ts
16 tests
text.mask
Mask all but the last n characters of a card, account or phone number, optionally keeping separators.
mask in Python
1.0.0
py rs ts
16 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
text.format-decimal
Format a float as plain decimal text with fixed or trimmed places and optional grouping, identically in every language.
format_decimal in Python
1.0.0
py rs ts
19 tests
text.slugify
Turn a title into a lowercase ASCII URL slug, transliterating common accented Latin letters.
slugify in Python
1.0.0
py rs ts
21 tests
charts.contrast → readableTextColor
WCAG 2.x contrast ratio between two colours, and which text colour reads best on a background.
readable_text_color in Python, one function of this group
1.0.0
py rs ts
22 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
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
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parse_money in Python
1.0.0
py rs ts
37 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
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
time.countdown
Seconds left until a Unix time, whether it has passed, and a timer text like 4:05, for tokens or retry waits.
countdown in Python
1.0.0
py rs ts
13 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.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
units.convert
Convert length, mass, area, volume, temperature and energy between units, exactly, as decimal text.
convert_units in Python
1.0.0
py rs ts
31 tests
agri.yield-per-hectare
Crop yield per hectare and per acre from harvested quantity and field area in any area unit, exactly, as decimal text.
yield_per_hectare in Python
1.0.1
py rs ts
19 tests
charts.format
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
A group of 5: format_tick, format_si, format_percent, format_date, format_money_tick
1.0.0
py rs ts
61 tests
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
roaming_charge in Python
1.0.1
py rs ts
16 tests
todo.recurrence-label
English text for a repeating todo's chip: "Every weekday", "Every 2 weeks on Monday", "Every month on the 31st".
recurrence_label in Python
1.0.0
py rs ts
30 tests
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
format_money in Python
1.0.0
py rs ts
11 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
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
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
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.export-csv
Write todos as a CSV file (RFC 4180) with one column per field, for backups, spreadsheets and other apps.
export_csv in Python
1.0.0
py rs ts
14 tests
fleet.emissions
Vehicle greenhouse gas emissions (grams CO2e) from fuel used or distance, using UK government DESNZ conversion factors.
fleet_emissions in Python
1.0.1
py rs ts
23 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
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
A group of 3: sign_jwt, verify_jwt, decode_jwt
1.0.0
py rs ts
54 tests
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in Python
1.0.0
py rs ts
13 tests
fleet.fuel-cost
Fuel cost of a trip from distance, fuel economy (UK or US mpg, or L/100km) and price per litre, exactly.
fuel_cost in Python
1.0.0
py rs ts
24 tests
hospitality.recipe-cost
Cost a recipe and each portion from ingredient quantities, pack sizes and pack prices, allowing for trim and waste.
recipe_cost in Python
1.0.1
py rs ts
25 tests
net.ipv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
A group of 3: parse_ipv6, format_ipv6, is_ipv6
1.0.0
py rs ts
47 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.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
fleet.cost-per-mile
Whole-life cost per mile of a vehicle, in tenths of a penny, from depreciation, fuel, maintenance, insurance and tax.
cost_per_mile in Python
1.0.0
py rs ts
13 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
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
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
validation.uk-modulus-table
Parse Vocalink's VALACDOS.txt and SCSUBTAB.txt into the table UK sort code modulus checking needs.
parse_uk_modulus_table in Python
1.0.0
py rs ts
28 tests
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
A group of 5: axis_from_ticks, number_axis, time_axis, band_axis, grid_lines
1.0.1
py rs ts
49 tests
charts.layout
Chart layout: the plot area inside margins, legend items wrapped into rows, and greedy label collision avoidance.
A group of 3: plot_area, legend_rows, avoid_collisions
1.0.1
py rs ts
33 tests
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trial_balance in Python
1.0.0
py rs ts
13 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
crypto.pbkdf2-sha256
PBKDF2 with HMAC-SHA256 (RFC 8018): derive a key from a password and salt, slowly, fast enough for a login request.
pbkdf2_sha256 in Python
1.0.0
py rs ts
14 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
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.filter
The todos a list view shows: all, active or completed, optionally one tag, and a search box, in input order.
filter_todos in Python
1.0.0
py rs ts
17 tests
todo.import-csv
Read todos from a CSV file (RFC 4180) as todo.export-csv writes it, checking every row, with row-numbered errors.
A group of 2: import_csv, validate_todo_csv
1.1.0
py rs ts
59 tests
todo.summary
Counts for a todo list's header or footer: total, active, done, overdue, due today, percent done and "3 items left".
summarise_todos in Python
1.0.0
py rs ts
13 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
collections.diff
Compare two lists of records by key: which were added, which removed, and which changed and in what fields.
diff_by_key in Python
1.0.0
py rs ts
18 tests
net.ipv4
Parse, format and check dotted-quad IPv4 addresses, refusing leading zeros, octal, hex and short forms.
A group of 3: parse_ipv4, format_ipv4, is_ipv4
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
net.port-list
Parse a port list such as 22,80,8000-8010 into port numbers, in order and without duplicates.
parse_port_list in Python
1.0.0
py rs ts
27 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
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
retail.price-per-unit
Unit price for shelf-edge labels: price per kg, per 100 g, per litre, per 100 ml, per metre or per item.
unit_price in Python
1.0.1
py rs ts
27 tests
monitor.http-check-result
Classify one HTTP probe as up, degraded or down, with a reason and message, from status, body and latency.
classify_http_check in Python
1.0.0
py rs ts
39 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
units.parse-quantity
Parse "2.5 kg", "1,200 m" or "12 ft 6 in" into an exact decimal value and a canonical unit symbol, strictly.
parse_quantity in Python
1.0.0
py rs ts
31 tests
property.floor-area Unreviewed
Floor area from room lengths and widths, exactly, with the total in both square metres and square feet.
floor_area in Python
1.0.2
py rs ts
20 tests
banking.cheque-amount-words
The words and figures to write on a cheque: "One hundred and twenty pounds and fifty pence only", "£120.50".
cheque_amount_words in Python
1.0.0
py rs ts
18 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
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
A group of 7: line_path, area_path, step_path, monotone_curve, bar_rects, arc_path, pie_angles
1.0.1
py rs ts
70 tests
charts.line-chart
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
line_chart in Python
1.0.0
py rs ts
11 tests
charts.palette
A categorical palette of n colour-blind-safe colours for chart series: Okabe-Ito or Paul Tol's bright scheme.
palette in Python
1.0.0
py rs ts
12 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
crypto.hmac-sha256
HMAC-SHA256 of a message under a secret key (RFC 2104, RFC 4231), in pure code that also runs in the browser.
hmac_sha256 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
manufacturing.batch-size
Economic batch quantity: the EOQ for a batch made at a finite production rate, in whole units.
economic_batch_quantity in Python
1.0.0
py rs ts
20 tests
react.form.form-field 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
todo.sort
Sort todos by manual order, due date, priority, creation time or title, stably, with sensible tie-breakers.
sort_todos in Python
1.0.0
py rs ts
20 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
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
monitor.parse-access-log
Parse one Apache/NCSA Common or Combined Log Format access log line; null for a line in neither format.
parse_access_log in Python
1.0.0
py rs ts
21 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
net.device-status
Classify a device as up, degraded or down from its latency summary and loss, p95 and jitter thresholds.
device_status in Python
1.0.0
py rs ts
22 tests
retail.sku-generate
Build a deterministic stock-keeping unit code from a prefix and product attributes.
generate_sku in Python
1.0.0
py rs ts
15 tests
time.unix-to-iso
Unix time in seconds to an ISO 8601 UTC timestamp such as 2026-09-26T12:00:00Z, for years 0001 to 9999.
unix_to_iso in Python
1.0.0
py rs ts
15 tests
lending.early-settlement Unreviewed
Early settlement figure and rebate on UK regulated consumer credit, per the Early Settlement Regulations 2004.
early_settlement in Python
1.0.1
py rs ts
18 tests
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.
egfr_ckd_epi2021 in Python
1.0.1
py rs ts
25 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
todo.due-label
The short English label shown next to a todo: "2 days overdue", "Due today", "Due tomorrow", "Due Fri 2 Oct".
due_label in Python
1.0.0
py rs ts
21 tests
manufacturing.takt-time
Takt time: available production time divided by customer demand, exact and in whole seconds.
takt_time in Python
1.0.0
py rs ts
14 tests