auth.password-hash
Hash a password for storage as pbkdf2_sha256$iterations$salt$hash, verify one in constant time, and spot weak hashes.
1.0.0
py rs ts
36 tests
Apache-2.0
form.validate-input
Check a text, email or number input: required, length, pattern and min/max, with GOV.UK messages.
1.0.0
py rs ts
49 tests
Apache-2.0
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
1.0.0
py rs ts
28 tests
Apache-2.0
auth.rbac
Roles with inheritance, permission checks with wildcards and ownership, and a generated per-role access-test matrix.
1.0.0
py rs ts
54 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.
1.0.1
py rs ts
31 tests
Apache-2.0 AND OGL-UK-3.0
email.send Integration · does I/O TypeScript only
Send a transactional email through Resend, any SMTP server or the log, behind one call.
1.0.0
ts
17 tests
MIT
auth.login-throttle
Allow a login attempt or lock the account out, from its recent failed attempts, with the seconds until it may retry.
1.0.0
py rs ts
19 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.
1.0.0
ts
14 tests
Apache-2.0
encoding.utf8
Text to UTF-8 bytes and strictly back (RFC 3629), so hashing and signing see the same bytes in every language.
1.0.0
py rs ts
25 tests
Apache-2.0
encoding.base64
Bytes to base64 and base64url text and back (RFC 4648), with strict decoding, identically in every language.
1.0.0
py rs ts
46 tests
Apache-2.0
crypto.constant-time-equal
Compare two byte strings in time that does not depend on where they differ, for checking MACs and hashes.
1.0.0
py rs ts
12 tests
Apache-2.0
auth.email-token
Hashed single-use tokens for email verification, password reset and magic links, with expiry, as pure steps.
1.0.0
py rs ts
43 tests
Apache-2.0
crypto.pbkdf2-sha256
PBKDF2 with HMAC-SHA256 (RFC 8018): derive a key from a password and salt, slowly, fast enough for a login request.
1.0.0
py rs ts
14 tests
Apache-2.0
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
1.0.0
py rs ts
13 tests
Apache-2.0
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
1.0.0
py rs ts
25 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.
1.0.0
py rs ts
47 tests
Apache-2.0
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).
1.0.1
ts
19 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.
1.1.0
ts
41 tests
MIT
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.
1.0.0
py rs ts
13 tests
Apache-2.0
money.amount
A currency-tagged monetary amount held in integer minor units.
1.0.2
py rs ts
17 tests
Apache-2.0
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
1.0.0
py rs ts
11 tests
Apache-2.0
finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
1.2.2
py rs ts
25 tests
Apache-2.0 AND OGL-UK-3.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).
1.0.1
ts
14 tests
Apache-2.0
form.address
Check a UK or international postal address form: required lines, lengths, country and postcode.
1.0.0
py rs ts
37 tests
Apache-2.0
validation.uk-postcode
Validate a UK postcode and normalise it to canonical upper case with one space before the inward code.
2.0.0
py rs ts
26 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).
1.0.1
ts
15 tests
Apache-2.0
dates.add-days
Shift an ISO date by a whole number of days, forwards or backwards, with exact calendar arithmetic.
1.0.0
py rs ts
28 tests
Apache-2.0
math.clamp
Clamp an integer to an inclusive range, refusing a range whose bounds are the wrong way round.
1.0.0
py rs ts
12 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.
1.0.0
ts
10 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).
1.0.1
ts
10 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.
1.0.0
py rs ts
12 tests
Apache-2.0
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
1.0.1
py rs ts
9 tests
Apache-2.0
money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
2.0.0
py rs ts
39 tests
Apache-2.0
money.sum
Total a list of monetary amounts, with an explicit currency for the empty case.
1.0.1
py rs ts
11 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.
1.0.0
py rs ts
24 tests
Apache-2.0
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
1.0.1
py rs ts
12 tests
Apache-2.0
money.apply-rate
Apply a rate expressed in basis points to a monetary amount, with an explicit rounding mode.
1.0.1
py rs ts
22 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.
1.0.0
ts
14 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.
1.0.0
ts
54 tests
MIT
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.
1.0.1
py rs ts
49 tests
Apache-2.0
math.round-div
Integer division with an explicit rounding mode, for money arithmetic that must not drift.
1.0.0
py rs ts
14 tests
Apache-2.0
auth.account-link
Decide whether an OAuth sign-in signs in, links to an existing account by verified email, creates one, or is refused.
1.0.0
py rs ts
16 tests
Apache-2.0
money.allocate
Split an amount across ratios without losing or inventing a single minor unit.
1.0.1
py rs ts
17 tests
Apache-2.0
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
1.0.2
py rs ts
20 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.
1.0.0
py rs ts
61 tests
Apache-2.0
retail.basket-total
Total a basket: line prices, promotions, a basket discount, VAT per line and delivery, into one checked total.
1.0.0
py rs ts
10 tests
Apache-2.0
auth.access-token
Issue an API's HS256 access token, read one from an Authorization header, and refuse revoked or superseded ones.
1.0.0
py rs ts
33 tests
Apache-2.0
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
1.0.0
py rs ts
37 tests
Apache-2.0
1.0.0
py rs ts
14 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.
1.0.0
py rs ts
14 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.
1.0.0
ts
14 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.
1.0.0
py rs ts
52 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.
1.0.0
py rs ts
11 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).
1.0.1
ts
22 tests
Apache-2.0
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
1.0.0
py rs ts
54 tests
Apache-2.0
retail.promotion-apply
Apply BOGOF, 3-for-2, percent off, amount off and multibuy deals to a basket, best for the customer, allocated to lines.
1.0.0
py rs ts
23 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).
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.
1.0.1
py rs ts
32 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).
1.0.1
ts
16 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.
1.0.0
ts
13 tests
Apache-2.0
retail.shipping-rate
Delivery charge from a dated rate table by service, zone, chargeable weight and size, with a free-over threshold.
1.0.1
py rs ts
20 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).
1.0.1
ts
13 tests
Apache-2.0
payments.stripe-portal Integration · does I/O TypeScript only
Open Stripe's customer portal so a customer manages plan, card and invoices, with a local stand-in.
1.0.0
ts
19 tests
MIT
auth.bearer-token
The token from an HTTP Authorization header of the form "Bearer <token>" (RFC 6750), or null if it has none.
1.0.0
py rs ts
18 tests
Apache-2.0
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.
1.0.0
py rs ts
15 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.
1.0.0
py rs ts
36 tests
Apache-2.0
retail.volumetric-weight
Chargeable parcel weight: the greater of actual and volumetric (dimensional) weight, rounded up to a billing step.
1.0.0
py rs ts
16 tests
Apache-2.0
1.0.1
py rs ts
15 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.
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.
1.0.0
py rs ts
80 tests
Apache-2.0
crypto.hmac-sha1
HMAC-SHA1 of a message under a secret key (RFC 2104, RFC 2202), the MAC under HOTP and TOTP codes.
1.0.0
py rs ts
14 tests
Apache-2.0
crypto.sha1
The SHA-1 digest of a byte string (FIPS 180-4), for HMAC-SHA1 in HOTP/TOTP codes; not for new signatures.
1.0.0
py rs ts
14 tests
Apache-2.0
1.0.0
py rs ts
15 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).
1.0.1
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).
1.0.1
ts
14 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).
1.0.1
ts
24 tests
Apache-2.0
1.0.0
py rs ts
9 tests
Apache-2.0
math.rational
Exact fraction arithmetic, always reduced, for rates and ratios that must not drift.
2.0.0
py rs ts
86 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.
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.
2.0.1
py rs ts
18 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).
1.0.1
ts
14 tests
Apache-2.0
dates.add-months
Add calendar months to an ISO date, clamping to the month end: 31 Jan + 1 month is 28 or 29 Feb.
1.0.0
py rs ts
22 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.
1.0.0
py rs ts
22 tests
Apache-2.0
fleet.drivers-hours Unreviewed
Check a driver's activities against GB/EU drivers' hours: breaks after 4.5h, daily, weekly and fortnightly driving.
1.0.2
py rs ts
26 tests
Apache-2.0 AND OGL-UK-3.0
react.form.styles React ^19 · TypeScript only
An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.
1.0.1
ts
21 tests
Apache-2.0
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
legal.court-fee Unreviewed
The court fee to issue a money claim in England and Wales, from the claim value bands in force on a date.
1.0.2
py rs ts
27 tests
Apache-2.0 AND OGL-UK-3.0
math.gcd-lcm
Greatest common divisor and least common multiple of two integers, exactly and without overflow.
2.0.0
py rs ts
39 tests
Apache-2.0
1.0.0
py rs ts
19 tests
Apache-2.0
1.0.0
py rs ts
26 tests
Apache-2.0
1.0.0
py rs ts
21 tests
Apache-2.0
health.appointment-slots Unreviewed
Bookable appointment slots from clinic sessions, a slot length, breaks and existing bookings.
1.0.1
py rs ts
20 tests
Apache-2.0
property.floor-area Unreviewed
Floor area from room lengths and widths, exactly, with the total in both square metres and square feet.
1.0.2
py rs ts
20 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.
2.0.1
py rs ts
18 tests
Apache-2.0 AND OGL-UK-3.0
todo.group-by-due
Split todos into Overdue, Today, Tomorrow, This week, Later, No date and Done sections, in that order.
1.1.0
py rs ts
26 tests
Apache-2.0
1.0.2
py rs ts
21 tests
Apache-2.0 AND OGL-UK-3.0
property.deposit-cap Unreviewed
Maximum tenancy deposit a landlord may take: five or six weeks' rent under the Tenant Fees Act 2019.
1.0.2
py rs ts
19 tests
Apache-2.0 AND OGL-UK-3.0
energy.climate-change-levy
Climate Change Levy on a business supply of electricity, gas, LPG or solid fuel, at the main rate in force on the date.
1.0.2
py rs ts
20 tests
Apache-2.0 AND OGL-UK-3.0
subscriptions.stripe-state
Folds Stripe's subscription and invoice webhook events into one normalised subscription state, in any order.
1.0.0
py rs ts
33 tests
Apache-2.0
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
monitor.burn-rate-alert
Multiwindow, multi-burn-rate SLO alerting: which rules fire, from event counts per window (Google SRE workbook).
2.0.0
py rs ts
30 tests
Apache-2.0
charity.gift-aid
Gift Aid a UK charity can claim on a donation: basic rate tax grossed up, 25p per £1 at 20%.
1.0.2
py rs ts
15 tests
Apache-2.0 AND OGL-UK-3.0
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.
1.0.2
py rs ts
32 tests
Apache-2.0 AND OGL-UK-3.0
invest.isa-allowance Unreviewed
ISA allowance used and remaining for a UK tax year: the overall limit, Lifetime ISA, cash ISA and Junior ISA.
1.0.2
py rs ts
30 tests
Apache-2.0 AND OGL-UK-3.0
property.rent-proration Unreviewed
Rent for part of a month from the monthly rent, by the annual-daily or the calendar-month method.
1.0.1
py rs ts
21 tests
Apache-2.0
payroll.pension-auto-enrolment Unreviewed
Workplace pension contributions for one pay period: qualifying earnings band, employee and employer shares, tax relief.
1.0.2
py rs ts
22 tests
Apache-2.0 AND OGL-UK-3.0
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.
1.0.2
py rs ts
27 tests
Apache-2.0
math.sin-cos
Sine and cosine of an angle in radians from + - * / only, so every language returns the same doubles.
1.0.1
py rs ts
10 tests
Apache-2.0
payroll.national-insurance Unreviewed
Employee and employer Class 1 National Insurance for one payment by category letter, exact percentage method.
1.0.2
py rs ts
29 tests
Apache-2.0 AND OGL-UK-3.0
property.stamp-duty Unreviewed
Stamp duty on a property purchase: SDLT (England, NI), LBTT (Scotland), LTT (Wales), with reliefs and surcharges.
1.0.2
py rs ts
51 tests
Apache-2.0 AND OGL-UK-3.0
fleet.tachograph-rest Unreviewed
Check daily and weekly rest against GB/EU drivers' hours: 11h daily (9h reduced, 3+9 split), 45h weekly (24h reduced).
1.0.2
py rs ts
22 tests
Apache-2.0 AND OGL-UK-3.0
insurance.ipt Unreviewed
UK Insurance Premium Tax at the standard or higher rate in force on a date, added to or taken out of a premium.
1.0.2
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
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.
1.0.2
py rs ts
30 tests
Apache-2.0 AND OGL-UK-3.0
lending.apr Unreviewed
Consumer-credit APR from drawdowns and repayments, by the FCA CONC App 1.2.6 equation, to one decimal place.
1.0.1
py rs ts
22 tests
Apache-2.0
dates.bank-holidays
UK bank and public holidays for a region and year, as published by gov.uk, including one-off holidays.
1.0.1
py rs ts
15 tests
Apache-2.0 AND OGL-UK-3.0
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
1.0.2
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
charts.layout
Chart layout: the plot area inside margins, legend items wrapped into rows, and greedy label collision avoidance.
1.0.1
py rs ts
33 tests
Apache-2.0
payroll.student-loan Unreviewed
Student loan or postgraduate loan deduction from one period's pay, by plan, rounded down to whole pounds.
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
text.normalise-name
Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.
1.0.0
py rs ts
23 tests
Apache-2.0
1.0.2
py rs ts
25 tests
Apache-2.0 AND OGL-UK-3.0
hospitality.allergen-matrix Unreviewed
Which of the 14 UK major allergens a dish contains or may contain, from its ingredients' declared allergens.
1.0.1
py rs ts
16 tests
Apache-2.0 AND OGL-UK-3.0
charts.scale
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
1.1.0
py rs ts
93 tests
Apache-2.0
property.council-tax-band Unreviewed
Council tax for a valuation band from the Band D charge: the statutory band ratio, England, Wales and Scotland.
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
todo.import-csv
Read todos from a CSV file (RFC 4180) as todo.export-csv writes it, checking every row, with row-numbered errors.
1.1.0
py rs ts
59 tests
Apache-2.0
logistics.sscc
Build an 18-digit SSCC pallet label number from extension digit, GS1 company prefix and serial, with its check digit.
1.1.0
py rs ts
16 tests
Apache-2.0
math.exp
e to the power x from + - * / only, so TypeScript, Python and Rust return the same double for the same input.
1.0.1
py rs ts
10 tests
Apache-2.0
todo.list
The to-do list reducer: add, edit, complete, remove, clear and reorder todos, each returning a new list.
1.1.0
py rs ts
102 tests
Apache-2.0
geo.distance
Great-circle distance in metres between two latitude/longitude points (haversine), to the millimetre.
2.0.0
py rs ts
21 tests
Apache-2.0
math.ln
Natural logarithm from + - * / only, so TypeScript, Python and Rust return the same double for the same input.
1.0.1
py rs ts
11 tests
Apache-2.0
charity.gasds
Gift Aid Small Donations Scheme top-up for a tax year: the £8,000 limit, the matching rule and community buildings.
1.0.2
py rs ts
21 tests
Apache-2.0 AND OGL-UK-3.0
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
1.0.1
py rs ts
49 tests
Apache-2.0
invest.cagr Unreviewed
Compound annual growth rate between two values over a whole or fractional number of years, in basis points.
1.0.1
py rs ts
22 tests
Apache-2.0
math.basis-points
Convert a rate between percent, basis points and a plain ratio exactly, as decimal text or integer basis points.
2.0.0
py rs ts
45 tests
Apache-2.0
stats.percentile
Percentile of a list of numbers by a named method: nearest-rank, or linear interpolation (R-7, Excel PERCENTILE.INC).
2.0.0
py rs ts
29 tests
Apache-2.0
subscriptions.mrr-arr
Monthly and annual recurring revenue from a list of subscriptions, normalising intervals and leaving out trials.
1.1.0
py rs ts
19 tests
Apache-2.0
fleet.company-car-bik Unreviewed
UK company car benefit in kind: appropriate percentage by CO2 and electric range, car and fuel benefit for a tax year.
1.0.2
py rs ts
37 tests
Apache-2.0 AND OGL-UK-3.0
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.
1.0.1
py rs ts
25 tests
Apache-2.0
payroll.overtime Unreviewed
Pay for the time worked in a period split into multiplier bands: basic, time and a half after 40 hours, double time.
1.0.1
py rs ts
11 tests
Apache-2.0
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
1.0.1
py rs ts
16 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.
1.1.0
py rs ts
19 tests
Apache-2.0
charts.extent
The minimum and maximum of a series as [min, max], skipping gaps (null), or null when there is no value.
1.0.1
py rs ts
15 tests
Apache-2.0
1.0.1
py rs ts
19 tests
Apache-2.0
stats.standard-deviation
Population or sample standard deviation of a list of numbers, two-pass, rounded to stated decimals.
2.0.0
py rs ts
21 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.
2.0.0
py rs ts
22 tests
Apache-2.0
invest.rebalance Unreviewed
Whole-unit buy and sell trades that bring a portfolio back to target weights, skipping trades below a minimum size.
1.0.1
py rs ts
22 tests
Apache-2.0
stats.moving-average
Simple or exponential moving average over a series, one value per full window, rounded to stated decimals.
2.0.0
py rs ts
24 tests
Apache-2.0
invest.drawdown-sustainability Unreviewed
How many years a pension or investment pot lasts under a yearly withdrawal and a constant growth rate, year by year.
1.0.1
py rs ts
19 tests
Apache-2.0
insurance.sum-insured-average Unreviewed
Average clause settlement for underinsurance: the loss times sum insured over value at risk, capped at the loss.
1.0.1
py rs ts
22 tests
Apache-2.0
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
1.0.1
py rs ts
70 tests
Apache-2.0
invest.dividend-yield Unreviewed
Trailing and forward dividend yield of a share or fund, in basis points, from the price and the dividends per unit.
1.0.1
py rs ts
19 tests
Apache-2.0
legal.retainer-drawdown Unreviewed
Apply money held on account in client account to bills in order: what each bill takes, what stays due, what is left.
1.0.1
py rs ts
11 tests
Apache-2.0
lending.affordability Unreviewed
Debt-to-income and a stressed-rate affordability test for a proposed loan's monthly repayment.
1.0.1
py rs ts
13 tests
Apache-2.0
finance.tax.vat-return Unreviewed
UK nine-box VAT return totals for a period from categorised sales and purchases (VAT Notice 700/12).
1.0.1
py rs ts
19 tests
Apache-2.0
payroll.net-to-gross Unreviewed
The gross pay that gives at least a target net pay in one UK pay period, found by a deterministic search.
1.0.2
py rs ts
13 tests
Apache-2.0
validation.phone-e164
Normalise a phone number to E.164 (+447700900123) using a default country's trunk and dialling prefixes.
2.0.0
py rs ts
31 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).
1.0.2
py rs ts
19 tests
Apache-2.0 AND OGL-UK-3.0
geo.bounding-box
Latitude/longitude bounding box that contains every point within a distance of a centre point.
2.0.0
py rs ts
15 tests
Apache-2.0
health.bsa Unreviewed
Body surface area in m² by the Mosteller and the DuBois & DuBois formulas, to 2 decimal places.
1.0.1
py rs ts
16 tests
Apache-2.0
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
1.0.1
py rs ts
18 tests
Apache-2.0
telecoms.call-rating
Rate a call from a rate deck: longest-prefix destination match, billing increments, connection fee and minimum charge.
1.0.1
py rs ts
22 tests
Apache-2.0
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
1.0.1
py rs ts
39 tests
Apache-2.0
fleet.emissions
Vehicle greenhouse gas emissions (grams CO2e) from fuel used or distance, using UK government DESNZ conversion factors.
1.0.1
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
payroll.notice-period Unreviewed
Statutory minimum notice in weeks from continuous service: one week per year from two years, capped at twelve.
1.0.1
py rs ts
10 tests
Apache-2.0 AND OGL-UK-3.0
property.rent-review Unreviewed
New rent after an index-linked (CPI/RPI) rent review, with an optional collar and cap and upward-only option.
1.0.1
py rs ts
19 tests
Apache-2.0
energy.carbon-emissions
kgCO2e from kWh or litres of a fuel, using the UK government GHG conversion factors for the year.
1.0.1
py rs ts
17 tests
Apache-2.0 AND OGL-UK-3.0
insurance.rating-factors Unreviewed
Premium from a base rate times factor-table lookups, loadings and discounts, within minimum and maximum premiums.
1.0.1
py rs ts
24 tests
Apache-2.0
logistics.duty-estimate Unreviewed
Estimate import duty and import VAT on goods: customs value on a CIF basis, the caller's duty rate, VAT on top.
1.0.1
py rs ts
17 tests
Apache-2.0
health.bmi Unreviewed
Adult body mass index (kg/m², 1 decimal place) and its NICE/WHO weight category.
1.0.1
py rs ts
22 tests
Apache-2.0
health.waiting-time Unreviewed
NHS England referral-to-treatment (RTT) wait in days and weekly bands, with the 18-week breach flag.
1.0.1
py rs ts
18 tests
Apache-2.0
hospitality.recipe-cost
Cost a recipe and each portion from ingredient quantities, pack sizes and pack prices, allowing for trim and waste.
1.0.1
py rs ts
25 tests
Apache-2.0
lending.amortisation-schedule Unreviewed
Repayment schedule for a level-payment loan: interest, principal and balance per period, ending at exactly zero.
1.0.1
py rs ts
13 tests
Apache-2.0
agri.spray-mix Unreviewed
Sprayer tank mix: tank fills, and product and water per full and part tank, for an area, water volume and dose.
1.0.1
py rs ts
14 tests
Apache-2.0
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.
1.0.1
py rs ts
19 tests
Apache-2.0
health.gestational-age Unreviewed
Gestational age (weeks+days) and estimated due date from the last menstrual period by Naegele's rule, cycle-adjusted.
1.0.1
py rs ts
20 tests
Apache-2.0
legal.court-deadline Unreviewed
A deadline in days under CPR 2.8: clear days, short periods skip weekends and bank holidays, court-closed days.
1.0.1
py rs ts
23 tests
Apache-2.0
dates.days-between
Calendar days from one ISO date to another, signed: negative when the second date is earlier.
1.0.0
py rs ts
15 tests
Apache-2.0
education.academic-year
The academic year and term a date falls in: 1 September to 31 August by default, terms from the caller.
1.0.1
py rs ts
23 tests
Apache-2.0
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.
1.0.1
py rs ts
19 tests
Apache-2.0
insurance.excess-apply Unreviewed
Claim payout after the compulsory and voluntary excess, capped at the policy limit.
1.0.1
py rs ts
16 tests
Apache-2.0
banking.faster-payments-limit
Whether a Faster Payment fits the scheme maximum, the bank's per-payment limit and what is left of its daily limit.
1.0.1
py rs ts
24 tests
Apache-2.0
education.school-year-group
School year group from date of birth on a date, by UK nation: Reception to Year 13, P1 to S6, P1 to Year 14.
1.0.1
py rs ts
22 tests
Apache-2.0 AND OGL-UK-3.0
health.news2 Unreviewed
NEWS2 early warning score from one set of observations: parameter scores, aggregate and RCP clinical risk band.
1.0.1
py rs ts
45 tests
Apache-2.0
math.atan
Arctangent in radians from + - * / only (fdlibm's method), so every language returns the same double.
1.0.1
py rs ts
22 tests
Apache-2.0
payroll.pro-rata-salary Unreviewed
Salary for part of a pay period and for part-time hours, by calendar days or working days, rounded once.
1.0.1
py rs ts
13 tests
Apache-2.0
property.holding-deposit-cap Unreviewed
Maximum holding deposit to reserve a rental property: one week's rent (annual rent ÷ 52), rounded down.
1.0.1
py rs ts
11 tests
Apache-2.0
invest.time-weighted-return Unreviewed
Time-weighted return from valuations taken at each external cash flow, geometrically linked exactly.
1.0.1
py rs ts
22 tests
Apache-2.0
lending.early-settlement Unreviewed
Early settlement figure and rebate on UK regulated consumer credit, per the Early Settlement Regulations 2004.
1.0.1
py rs ts
18 tests
Apache-2.0
payroll.gross-to-net Unreviewed
A UK payslip for one pay period: gross pay, pension, PAYE tax, National Insurance, student loans and net pay.
1.0.1
py rs ts
8 tests
Apache-2.0 AND OGL-UK-3.0
1.0.0
py rs ts
13 tests
Apache-2.0
agri.stocking-rate
Stocking rate: livestock units and LU per hectare from animal numbers, by a published LU coefficient table.
1.0.1
py rs ts
17 tests
Apache-2.0 AND OGL-UK-3.0
1.0.1
py rs ts
13 tests
Apache-2.0
dates.recurrence
The next n dates of a repeating rule: monthly on a day, last weekday of the month, every k days or weeks, yearly.
1.0.0
py rs ts
25 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.
1.0.1
py rs ts
24 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.
1.0.1
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.
1.0.1
py rs ts
19 tests
Apache-2.0 AND OGL-UK-3.0
legal.time-billing Unreviewed
Fees from time entries: each rounded to 6-minute (or other) units and priced at the fee earner's hourly rate.
1.0.1
py rs ts
15 tests
Apache-2.0
legal.limitation-date Unreviewed
The last day to bring a claim under the Limitation Act 1980, by claim type, from the date it accrued.
1.0.1
py rs ts
26 tests
Apache-2.0 AND OGL-UK-3.0
todo.parse-quick-add
Turn one typed line like "Pay rent tomorrow !high #home every month" into a todo draft.
1.0.0
py rs ts
44 tests
Apache-2.0
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.
1.0.1
py rs ts
20 tests
Apache-2.0
lending.overpayment-effect Unreviewed
What a one-off overpayment does to a loan: a shorter term at the same payment, or a lower payment over the same term.
1.0.1
py rs ts
14 tests
Apache-2.0