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
Apache-2.0
react.form.file-upload React ^19 · TypeScript only
A labelled file upload field: accept, size and how-many checked by form.file-check, the chosen files listed with errors.
FileUpload in TypeScript
1.0.0
ts
13 tests
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
react.form.address-fields React ^19 · TypeScript only
A UK or international address form under one legend: each line labelled and autocompleted, checked by form.address.
AddressFields in TypeScript
1.0.0
ts
10 tests
Apache-2.0
form.file-check
Check files chosen in an upload field: accept types, size, empty files and how many, with GOV.UK messages.
A group of 3: validateFiles, acceptsFile, formatFileSize
1.0.0
py rs ts
52 tests
Apache-2.0
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
Apache-2.0
react.form.money-field React ^19 · TypeScript only
A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.
MoneyField in TypeScript
1.0.0
ts
14 tests
Apache-2.0
form.address
Check a UK or international postal address form: required lines, lengths, country and postcode.
A group of 2: validateAddress, addressFormat
1.0.0
py rs ts
37 tests
Apache-2.0
react.form.date-field React ^19 · TypeScript only
A labelled date picker (<input type="date">) with min and max, checked by form.iso-date, its error shown accessibly.
DateField in TypeScript
1.0.0
ts
14 tests
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
form.money-input
Read a typed amount as minor units for its currency and locale, check min/max, and format it back.
A group of 3: parseMoneyInput, formatMoneyInput, moneyInputFormat
1.0.0
py rs ts
61 tests
Apache-2.0
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
Apache-2.0
react.form.validated-input React ^19 · TypeScript only
A text, email or number input that checks itself with form.validate-input and shows the error accessibly.
ValidatedInput in TypeScript
1.0.0
ts
14 tests
Apache-2.0
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
Apache-2.0
form.validate-input
Check a text, email or number input: required, length, pattern and min/max, with GOV.UK messages.
validateInput in TypeScript
1.0.0
py rs ts
49 tests
Apache-2.0
form.iso-date
Check a date picker value (YYYY-MM-DD) against required, past/future and min/max rules, timezone-safe.
validateIsoDate in TypeScript
1.0.0
py rs ts
24 tests
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
text.pattern-match
Does the whole value match an HTML pattern attribute? The same answer in a browser, Python and Rust.
matchesPattern in TypeScript
1.0.0
py rs ts
47 tests
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0 AND OGL-UK-3.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0 AND OGL-UK-3.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
encoding.base32
Bytes to RFC 4648 base32 text (A-Z, 2-7) and back, strictly, as authenticator-app secrets are written.
A group of 2: base32Encode, base32Decode
1.0.0
py rs ts
36 tests
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
auth.email-token
Hashed single-use tokens for email verification, password reset and magic links, with expiry, as pure steps.
A group of 4: generateEmailToken, hashEmailToken, checkEmailToken, consumeEmailToken
1.0.0
py rs ts
43 tests
Apache-2.0
payments.stripe-checkout Integration · does I/O TypeScript only
Start a Stripe Checkout session and verify Stripe's signed webhooks, with a local stand-in for development.
A group of 3: createCheckoutSession, verifyWebhook, signWebhook
1.1.0
ts
41 tests
MIT
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
Apache-2.0
auth.oauth-sign-in Integration · does I/O TypeScript only
Sign users in with OpenID Connect or GitHub (authorisation code + PKCE), and keep them in a signed session cookie.
A group of 5: beginSignIn, completeSignIn, createSession, readSession, sessionCookie
1.0.0
ts
54 tests
MIT
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
Apache-2.0
auth.recovery-codes
Two-factor recovery codes: generate from caller entropy, hash for storage, and verify-and-consume as a pure step.
A group of 4: generateRecoveryCodes, normaliseRecoveryCode, hashRecoveryCode, consumeRecoveryCode
1.0.0
py rs ts
39 tests
Apache-2.0
auth.totp
Authenticator-app two-factor codes (TOTP RFC 6238, HOTP RFC 4226): secret, QR URI, codes, verify with window and drift.
A group of 5: totpSecret, totpUri, hotpCode, totpCode, verifyTotp
1.0.0
py rs ts
80 tests
Apache-2.0
storage.signed-url Integration · does I/O TypeScript only
Signed URLs for a browser to upload a file straight to S3 or Google Cloud Storage, and to download it.
A group of 2: signUpload, signDownload
1.0.0
ts
25 tests
MIT
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
Apache-2.0
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
Apache-2.0 AND OGL-UK-3.0
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
Apache-2.0 AND OGL-UK-3.0
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
Apache-2.0
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
Apache-2.0 AND OGL-UK-3.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0
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
Apache-2.0