Every capability
Ordered by level: primitives at the bottom of the graph, workflows at the top. Each one carries its own tests, at least 8 per function.
Suites — the capabilities a kind of app is built from: accounting, payroll, an online shop, a clinic…
Collection: React form elements — accessible form components for React, and the pure helpers they use.
Level 0 primitive
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
charts.contrast
WCAG 2.x contrast ratio between two colours, and which text colour reads best on a background.
A group of 2:
contrastRatio, readableTextColor
charts.extent
The minimum and maximum of a series as [min, max], skipping gaps (null), or null when there is no value.
extent in TypeScript
collections.chunk
Split a list into consecutive batches of at most n items, in order; the last batch may be short.
chunk in TypeScript
crypto.constant-time-equal
Compare two byte strings in time that does not depend on where they differ, for checking MACs and hashes.
constantTimeEqual in TypeScript
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.
hmacSha256 in TypeScript
crypto.pbkdf2-sha256
PBKDF2 with HMAC-SHA256 (RFC 8018): derive a key from a password and salt, slowly, fast enough for a login request.
pbkdf2Sha256 in TypeScript
crypto.sha256
The SHA-256 digest of a byte string (FIPS 180-4), in pure code that also runs in the browser.
sha256 in TypeScript
dates.add-days
Shift an ISO date by a whole number of days, forwards or backwards, with exact calendar arithmetic.
addDays in TypeScript
dates.add-months
Add calendar months to an ISO date, clamping to the month end: 31 Jan + 1 month is 28 or 29 Feb.
addMonths in TypeScript
dates.day-of-week
The ISO 8601 day of the week for a date: 1 is Monday through 7 is Sunday.
dayOfWeek in TypeScript
dates.days-between
Calendar days from one ISO date to another, signed: negative when the second date is earlier.
daysBetween in TypeScript
dates.is-leap-year
Whether a year is a Gregorian leap year: every 4th, except centuries, except every 400th.
isLeapYear in TypeScript
dates.overlap
Days two date ranges have in common, with the end of each range stated as inclusive or exclusive.
overlapDays in TypeScript
dates.quarter
Calendar quarter and fiscal quarter of a date, with the fiscal year and quarter date ranges, for any start month.
quarter in TypeScript
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
education.academic-year
The academic year and term a date falls in: 1 September to 31 August by default, terms from the caller.
academicYear in TypeScript
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
encoding.hex
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
A group of 2:
hexEncode, hexDecode
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
geo.bounding-box
Latitude/longitude bounding box that contains every point within a distance of a centre point.
boundingBox in TypeScript
geo.distance
Great-circle distance in metres between two latitude/longitude points (haversine), to the millimetre.
distance in TypeScript
geo.point-in-polygon
Whether a latitude/longitude point lies inside a polygon (ray casting; the boundary counts as inside).
pointInPolygon in TypeScript
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.
ageInMonths in TypeScript
health.bmi Unreviewed
Adult body mass index (kg/m², 1 decimal place) and its NICE/WHO weight category.
bmi in TypeScript
health.bsa Unreviewed
Body surface area in m² by the Mosteller and the DuBois & DuBois formulas, to 2 decimal places.
bodySurfaceArea in TypeScriptLevel 1 generic concept
money.split-even
Split an amount into n near-equal parts that add back up to exactly the whole.
splitEven in TypeScript
agri.field-area
Field area in square metres, hectares and acres from a boundary polygon of latitude/longitude points.
fieldArea in TypeScript
agri.growing-degree-days
Growing degree days (thermal time) from daily min/max temperatures, a base and an optional upper cap.
growingDegreeDays in TypeScript
agri.seed-rate
Seed rate in kg/ha from target plants per m², thousand-grain weight and expected establishment.
seedRate in TypeScript
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.
sprayMix in TypeScript
agri.stocking-rate
Stocking rate: livestock units and LU per hectare from animal numbers, by a published LU coefficient table.
stockingRate in TypeScript
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.
yieldPerHectare in TypeScript
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
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:
signJwt, verifyJwt, decodeJwt
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
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.
fasterPaymentsCheck in TypeScript
banking.savings-aer
AER (annual equivalent rate) from a gross nominal rate and how often interest is paid, to two decimal places.
savingsAer in TypeScript
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
charity.fundraising-ratio
Cost to raise £1 and charitable spend ratio for a charity, in exact basis points.
fundraisingRatios in TypeScript
charity.gift-aid-eligibility
Whether a UK donation qualifies for Gift Aid: declaration, enough tax paid, and the donor benefit limits.
giftAidEligibility in TypeScript
charity.regular-giving-schedule
Collection dates for a regular gift: monthly, quarterly or annual on a day, clamped to short months, after a lead time.
regularGivingSchedule in TypeScript
charts.downsample
Reduce a long series to a few points that keep its visual shape, by Largest-Triangle-Three-Buckets (LTTB).
downsample in TypeScript
charts.format
Axis and label text for charts: tick numbers, SI prefixes (1.2k, 3.4M), percentages, dates and money.
A group of 5:
formatTick, formatSi, formatPercent, formatDate, formatMoneyTick
charts.histogram-bins
Bin values into histogram bins on round edges, by Sturges' rule, Freedman-Diaconis, or a fixed width.
histogramBins in TypeScript
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
charts.palette
A categorical palette of n colour-blind-safe colours for chart series: Okabe-Ito or Paul Tol's bright scheme.
palette in TypeScript
charts.scale
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
A group of 7:
linearScale, invertLinear, niceDomain, logScale, timeScale, bandScale, pointScale
charts.ticks
Axis ticks: a round step (1, 2 or 5 x 10^k), the ticks on it, and calendar ticks from days to years.
A group of 4:
tickStep, niceTicks, timeTickInterval, timeTicks
collections.dedupe-by-key
Remove records that share a key value, keeping the first or the last of each, in input order.
dedupeByKey in TypeScript
collections.diff
Compare two lists of records by key: which were added, which removed, and which changed and in what fields.
diffByKey in TypeScript
collections.group-by-key
Group records by the value at one key, preserving input order inside each group.
groupByKey in TypeScript
collections.paginate
Slice a list into a 1-based page and report the totals an API response needs.
paginate in TypeScript
collections.search-text
Filter records by a case-insensitive substring match across named fields, in input order.
searchText in TypeScript
collections.sort-by
Stably sort records by one key, ascending or descending, with a total order across mixed types.
sortBy in TypeScript
construction.brick-count
Bricks and mortar for a wall, openings subtracted, for UK standard 215 x 102.5 x 65 mm bricks with 10 mm joints.
brickCount in TypeScript
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
construction.materials-area
Packs of tiles, paint, plasterboard or flooring to cover an area, with waste and coats, rounded up to whole packs.
materialsArea in TypeScript
construction.roof-pitch
Roof pitch in degrees, rafter length and roof slope area from span, rise and length.
roofPitch in TypeScript
construction.timber-length
Cutting list: which stock lengths to buy and which pieces to cut from each, allowing for saw kerf.
timberCuttingList in TypeScript
dates.add-business-days
Move a date forward or back by working days, skipping weekends and a caller-supplied holiday list.
addBusinessDays in TypeScript
dates.age
Age in whole years on a given date, with 29 February birthdays ageing on 1 March in other years.
age in TypeScript
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
dates.business-days-between
Working days between two dates, excluding weekends and a caller-supplied holiday list.
businessDaysBetween in TypeScript
dates.day-count-fraction
Year fraction between two dates by ACT/365F, ACT/360, 30/360, 30E/360 or ACT/ACT ISDA, as an exact fraction.
dayCountFraction in TypeScript
dates.month-boundaries
The first day, last day and length of the calendar month containing a date.
monthBoundaries in TypeScript
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.
recurrence in TypeScript
education.attendance-rate
Pupil attendance and absence rates in basis points, with the DfE persistent and severe absence flags.
attendanceRate in TypeScript
education.cpd-hours
CPD logged against a requirement for a rolling or fixed period: minutes counted, shortfall and days left.
cpdHours in TypeScript
education.degree-classification
UK honours degree class (First, 2:1, 2:2, Third) from module marks and credits, weighted by level.
degreeClassification in TypeScript
education.gpa
Grade point average on a 4.0 scale from letter grades and credit hours, weighted by credits and rounded once.
gpa in TypeScript
education.grade-boundaries
Grade for a mark from the caller's boundary table: inclusive lower bounds, ungraded below the lowest.
gradeForMark in TypeScript
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.
schoolYearGroup in TypeScript
energy.carbon-emissions
kgCO2e from kWh or litres of a fuel, using the UK government GHG conversion factors for the year.
carbonEmissions in TypeScript
energy.degree-days
Heating and cooling degree days from daily mean temperatures and a base temperature, exact to 0.1.
degreeDays in TypeScript
energy.gas-kwh
Convert gas meter units (cubic metres or hundreds of cubic feet) to kWh with the calorific value and 1.02264 correction.
gasKwh in TypeScript
energy.meter-advance
Units consumed between two meter reads, counting the meter rolling over past all nines once.
meterAdvance in TypeScript
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
finance.payment-terms-due-date
Invoice due date from payment terms: net N days, end of month, N days after month end, day N of next month.
paymentDueDate in TypeScript
fleet.cost-per-mile
Whole-life cost per mile of a vehicle, in tenths of a penny, from depreciation, fuel, maintenance, insurance and tax.
costPerMile in TypeScript
fleet.emissions
Vehicle greenhouse gas emissions (grams CO2e) from fuel used or distance, using UK government DESNZ conversion factors.
fleetEmissions in TypeScript
fleet.ev-charging-cost
Cost of an electric vehicle charge from the energy added, charger efficiency and power, and time-of-use tariff windows.
evChargingCost in TypeScript
fleet.fuel-cost
Fuel cost of a trip from distance, fuel economy (UK or US mpg, or L/100km) and price per litre, exactly.
fuelCost in TypeScript
fleet.service-due
Next vehicle service by months or miles, whichever comes first, projecting the mileage date, with an overdue flag.
serviceDue in TypeScript
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
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
form.state TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
A group of 3:
initialFormState, formReducer, visibleErrors
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.
egfrCkdEpi2021 in TypeScript
health.gestational-age Unreviewed
Gestational age (weeks+days) and estimated due date from the last menstrual period by Naegele's rule, cycle-adjusted.
gestationalAge in TypeScript
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
health.waiting-time Unreviewed
NHS England referral-to-treatment (RTT) wait in days and weekly bands, with the 18-week breach flag.
rttWaitingTime in TypeScript
hospitality.occupancy-adr-revpar
Hotel occupancy, average daily rate (ADR) and revenue per available room (RevPAR) for a period.
occupancyAdrRevpar in TypeScript
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
hospitality.service-charge
A discretionary service charge on a bill's eligible lines, as a basis-point rate with explicit rounding.
serviceCharge in TypeScript
hr.absence-bradford-factor
Bradford factor for a set of absence spells: spells squared times total days, which weights frequent short absences.
bradfordFactor in TypeScript
hr.length-of-service
Continuous service between two dates in completed years, months and days, counting both end dates.
lengthOfService in TypeScript
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
insurance.age-banding Unreviewed
Age at policy inception and the rating band it falls in, from a table of age bands.
ageBand in TypeScript
insurance.excess-apply Unreviewed
Claim payout after the compulsory and voluntary excess, capped at the policy limit.
applyExcess in TypeScript
insurance.loss-ratio Unreviewed
Loss ratio, expense ratio and combined ratio in basis points, from earned premium, incurred claims and expenses.
lossRatios in TypeScript
inventory.eoq
Economic order quantity (Harris/Wilson): the order size that minimises ordering plus holding cost, in whole units.
economicOrderQuantity in TypeScript
inventory.pallet-fit
How many cartons fit per layer and per pallet (UK 1200x1000 or EUR 1200x800), within a height and weight limit.
palletFit in TypeScript
inventory.reorder-point
Reorder point: demand over the supplier lead time, rounded up to whole units, plus safety stock.
reorderPoint in TypeScriptLevel 2 domain function
hospitality.bill-split
Split a restaurant bill evenly, by item or by share, exactly to the penny, with the service charge shared in proportion.
billSplit in TypeScript
agri.feed-ration
Ration costing and dry matter intake from each feed's fresh weight, DM % and price per tonne, in exact money.
feedRation in TypeScript
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
agri.gross-margin
Enterprise gross margin (output less variable costs), in total and per hectare or per head, in exact money.
grossMargin in TypeScript
finance.proration
Split an amount into the part used and the part unused over a billing period, losing nothing.
prorate in TypeScript
agri.milk-price
Milk price per litre and payment from a contract's base price, butterfat/protein adjustments and bonuses.
milkPrice in TypeScript
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
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
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
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
banking.bacs-processing-date
Bacs three-day cycle: input, processing and entry (arrival) dates for a submission, skipping weekends and bank holidays.
bacsProcessingDates in TypeScript
banking.cheque-amount-words
The words and figures to write on a cheque: "One hundred and twenty pounds and fifty pence only", "£120.50".
chequeAmountWords in TypeScript
banking.fees-cap
Apply a monthly fee cap to a list of account charges: charge up to the cap, waive the rest.
applyFeeCap in TypeScript
banking.overdraft-interest
Overdraft interest for a statement period from daily balances, with an interest-free buffer.
overdraftInterest in TypeScript
charity.gasds
Gift Aid Small Donations Scheme top-up for a tax year: the £8,000 limit, the matching rule and community buildings.
gasds in TypeScript
charity.gift-aid
Gift Aid a UK charity can claim on a donation: basic rate tax grossed up, 25p per £1 at 20%.
giftAid in TypeScript
charity.higher-rate-relief
A Gift Aid donor's extra tax relief at higher, intermediate, additional and top rates, by extending the tax bands.
higherRateRelief in TypeScript
charity.payroll-giving
UK Payroll Giving for one pay period: the donation comes off pay before PAYE, and the tax it saves the employee.
payrollGiving in TypeScript
charity.restricted-funds
Allocate charity spending to restricted funds first, then unrestricted funds, never overdrawing a restricted fund.
allocateFundSpend in TypeScript
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
A group of 5:
axisFromTicks, numberAxis, timeAxis, bandAxis, gridLines
charts.layout
Chart layout: the plot area inside margins, legend items wrapped into rows, and greedy label collision avoidance.
A group of 3:
plotArea, legendRows, avoidCollisions
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
A group of 7:
linePath, areaPath, stepPath, monotoneCurve, barRects, arcPath, pieAngles
charts.stack
Stack several series for stacked bars and areas: on zero, normalised to 100%, or diverging around zero.
stack in TypeScript
construction.cis-deduction
Construction Industry Scheme deduction (0, 20 or 30%) on the labour part of a subcontractor payment.
cisDeduction in TypeScript
construction.day-rate-quote
A trade quote from labour days at a day rate, materials with a markup, and VAT.
dayRateQuote in TypeScript
construction.payment-notice-dates
Construction Act default dates: payment due, payment notice, final date for payment and pay-less notice.
paymentNoticeDates in TypeScript
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in TypeScript
construction.vat-reverse-charge
Whether the UK VAT domestic reverse charge applies to a construction supply, and the invoice wording.
domesticReverseCharge in TypeScript
dates.uk-tax-year
The UK personal tax year containing a date: 6 April to 5 April, with HMRC's label.
ukTaxYear in TypeScript
education.fee-instalments
Tuition fee instalment schedule from a total, shares and due dates, exact to the penny.
feeInstalments in TypeScript
education.student-loan-repayment
A graduate's student or postgraduate loan repayment for a tax year, as Self Assessment works it out.
studentLoanRepayment in TypeScript
education.timetable-clash
Find timetable clashes: overlapping sessions that share a room, a teacher or a student group, in a fixed order.
timetableClashes in TypeScript
education.weighted-grade
Weighted percentage across coursework and exam components, exact as a fraction, then rounded once.
weightedGrade in TypeScript
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.
climateChangeLevy in TypeScript
energy.estimate-read
Estimate a meter read for a date from the average daily consumption between two earlier reads, with rollover.
estimateRead in TypeScript
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
energy.solar-generation
Estimated annual solar PV generation by the MCS method: kWp x Kk x shade factor, per array and in total.
solarGeneration in TypeScript
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
energy.water-bill
Metered water and sewerage bill from two reads: volumetric charges, return to sewer, standing and surface water charges.
waterBill in TypeScript
finance.accruals-prepayments
Split an invoice across accounting periods by days of service, for accruals, prepayments and deferred income.
allocateToPeriods in TypeScript
finance.aged-debt
Aged debt report: open invoices bucketed as current, 1-30, 31-60, 61-90 and 90+ days overdue as at a date.
agedDebt in TypeScript
finance.bank-reconcile-match
Match bank statement lines to ledger entries by exact amount, a date window and reference similarity, deterministically.
matchBankLines in TypeScript
finance.compound-interest
Compound interest accrued period by period in minor units, the way a statement is built.
compoundInterest in TypeScript
finance.depreciation-reducing-balance
Reducing-balance depreciation schedule at a fixed rate, writing off to the residual value in the final year.
reducingBalanceDepreciation in TypeScript
finance.depreciation-straight-line
Straight-line depreciation schedule whose charges sum exactly to cost less residual value.
straightLineDepreciation in TypeScript
finance.early-payment-discount
Early settlement discount available on a payment date under "2/10 net 30" style terms, and the amount to pay.
earlyPaymentDiscount in TypeScript
finance.fx-revaluation
Unrealised foreign exchange gain or loss on foreign-currency balances revalued at a period-end rate.
fxRevaluation in TypeScript
finance.invoice.line-total
Net total for one invoice line: unit price by quantity, less a discount.
lineTotal in TypeScript
finance.late-payment-interest
UK statutory late payment interest (8% over Bank Rate) and fixed compensation under the Late Payment Act 1998.
latePaymentInterest in TypeScript
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trialBalance in TypeScript
finance.margin
Profit on a sale with both the margin and the markup, so the two are never confused.
margin in TypeScript
finance.markup-price
Selling price from a cost and a target margin or markup in basis points, with explicit rounding.
markupPrice in TypeScript
finance.tax.add-vat Unreviewed
Add VAT to a net amount using the rate in force on the date of supply.
addVat in TypeScript
finance.tax.remove-vat Unreviewed
Extract the VAT already included in a gross amount, using the rate in force on the date of supply.
removeVat in TypeScript
finance.tax.vat-flat-rate Unreviewed
UK VAT Flat Rate Scheme: VAT due on gross turnover at the sector's dated rate, limited cost rate and first-year 1% off.
flatRateVat in TypeScript
finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
vatRate in TypeScript
finance.uk-bank-rate
Bank of England Bank Rate (base rate) in force on a date, from the Bank's official history since 2001.
ukBankRate in TypeScript
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.
companyCarBik in TypeScript
fleet.drivers-hours Unreviewed
Check a driver's activities against GB/EU drivers' hours: breaks after 4.5h, daily, weekly and fortnightly driving.
checkDriversHours in TypeScript
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
mileageAllowance in TypeScript
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).
checkTachographRest in TypeScript
fleet.vehicle-depreciation
A vehicle's current value from its cost, age and mileage, on retention curves the caller supplies, exactly.
vehicleDepreciation in TypeScript
health.appointment-slots Unreviewed
Bookable appointment slots from clinic sessions, a slot length, breaks and existing bookings.
appointmentSlots in TypeScript
health.dose-weight-based Unreviewed
Weight-based dose (per kg) capped at a maximum single dose and rounded to a measurable volume, in exact micro-units.
weightBasedDose in TypeScript
health.news2 Unreviewed
NEWS2 early warning score from one set of observations: parameter scores, aggregate and RCP clinical risk band.
news2Score in TypeScript
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
hospitality.allergen-matrix Unreviewed
Which of the 14 UK major allergens a dish contains or may contain, from its ingredients' declared allergens.
allergenMatrix in TypeScript
hospitality.cancellation-charge
Cancellation fee for a booking from a policy of notice bands and the days of notice given.
cancellationCharge in TypeScript
hospitality.gross-profit-menu
Menu gross profit (GP%) on the VAT-exclusive price, and the menu price that reaches a target GP.
A group of 2:
menuGrossProfit, menuPriceForGp
hospitality.recipe-cost
Cost a recipe and each portion from ingredient quantities, pack sizes and pack prices, allowing for trim and waste.
recipeCost in TypeScript
hospitality.room-rate
Price a hotel stay night by night from the caller's seasonal, day-of-week rate table, less any length-of-stay discount.
roomRate in TypeScript
hospitality.tourist-tax
Visitor levy (tourist tax) on an overnight stay: Edinburgh's 5%, Cardiff's per person per night, or a caller's own rule.
touristTax in TypeScript
hospitality.tronc-allocation
Share a tips pool (tronc) between staff by hours worked, points, or hours times points, exactly to the penny.
troncAllocation in TypeScript
insurance.claim-reserve Unreviewed
Claim reserve history: paid, recovered, outstanding and incurred after each transaction, and the movement.
claimReserveHistory in TypeScript
insurance.instalment-plan Unreviewed
Pay a premium by monthly instalments: deposit, flat credit charge, instalments exact to the penny, and the APR.
instalmentPlan in TypeScript
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.
insurancePremiumTax in TypeScript
insurance.mid-term-adjustment Unreviewed
Additional or return premium for a mid-term policy change, pro rata on the days left, plus an admin fee.
midTermAdjustment in TypeScript
insurance.no-claims-discount Unreviewed
No-claims discount at renewal: earn a year, or step back after claims on the insurer's scale, with NCD protection.
nextNoClaimsDiscount in TypeScript
insurance.premium-proration Unreviewed
Return premium on mid-term cancellation, pro rata or on a short-period scale, with an optional minimum retained premium.
cancellationReturnPremium in TypeScript
insurance.rating-factors Unreviewed
Premium from a base rate times factor-table lookups, loadings and discounts, within minimum and maximum premiums.
ratePremium in TypeScript
insurance.sum-insured-average Unreviewed
Average clause settlement for underinsurance: the loss times sum insured over value at risk, capped at the loss.
averageClauseSettlement in TypeScript
inventory.abc-classification
ABC classes by annual consumption value (Pareto), with configurable cut-offs such as 80/15/5 and deterministic ties.
abcClassification in TypeScript
inventory.cycle-count-schedule
Cycle count schedule: spread each item's counts evenly over the working days of a period, by ABC class frequency.
cycleCountSchedule in TypeScript
inventory.expiry-fefo
First-expiry-first-out pick list for a quantity across batches, skipping expired and short-dated stock.
fefoPick in TypeScriptLevel 3 business operation
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
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validatePasswordChange in TypeScript
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
charity.reclaim-batch
Gift Aid claim totals for a period from donation records: donor lines, aggregated small gifts, tax due.
giftAidClaimBatch in TypeScript
charts.bar-chart
Complete bar chart geometry as data, grouped or stacked: plot area, axes, gridlines, bar rectangles, colours, legend.
barChart in TypeScript
charts.line-chart
Complete line chart geometry as data: plot area, number or date axes, gridlines, series paths, colours, legend.
lineChart in TypeScript
charts.sparkline
A sparkline's SVG path and end marker from a series, fitted into a box, with gaps left as breaks.
sparkline in TypeScript
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interimValuation in TypeScript
energy.bill-calculate
Electricity or gas bill from two meter reads: energy, standing charge, Climate Change Levy and VAT.
calculateEnergyBill in TypeScript
finance.credit-note.calculate
Credit note against an original invoice, by units or by amount, with VAT at the original tax point's rates.
calculateCreditNote in TypeScript
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculateInvoice in TypeScript
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