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.
netToGross in TypeScript
1.0.2
py rs ts
13 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.
grossToNet in TypeScript
1.0.1
py rs ts
8 tests
Apache-2.0 AND OGL-UK-3.0
net.port-list
Parse a port list such as 22,80,8000-8010 into port numbers, in order and without duplicates.
parsePortList in TypeScript
1.0.0
py rs ts
27 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
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
net.port
Check a TCP/UDP port number and name the IANA service registered on it, with its system/user/dynamic range.
A group of 2: isPort, portService
1.0.0
py rs ts
30 tests
Apache-2.0
net.ip-classify
Classify an IPv4 or IPv6 address as loopback, private, link-local, multicast, documentation, CGNAT or global.
classifyIp in TypeScript
1.0.0
py rs ts
34 tests
Apache-2.0
net.cidr-hosts
List every usable host address in an IPv4 CIDR block, refusing blocks larger than a limit.
cidrHosts in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
net.device-status
Classify a device as up, degraded or down from its latency summary and loss, p95 and jitter thresholds.
deviceStatus in TypeScript
1.0.0
py rs ts
22 tests
Apache-2.0
net.ipv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
A group of 3: parseIpv6, formatIpv6, isIpv6
1.0.0
py rs ts
47 tests
Apache-2.0
net.latency-summary
Summarise probe results: sent, received, loss, min/avg/max, p95 and jitter, in whole microseconds.
summariseLatency in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
net.ipv4
Parse, format and check dotted-quad IPv4 addresses, refusing leading zeros, octal, hex and short forms.
A group of 3: parseIpv4, formatIpv4, isIpv4
1.0.0
py rs ts
39 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
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
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
1.0.0
py rs ts
26 tests
Apache-2.0
subscriptions.churn
Logo churn, gross and net revenue churn, and gross and net revenue retention for one period, in basis points.
churnMetrics in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
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
1.0.0
py rs ts
16 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.
removeVat in TypeScript
1.0.2
py rs ts
20 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.
addVat in TypeScript
1.0.1
py rs ts
9 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.
pensionContributions in TypeScript
1.0.2
py rs ts
22 tests
Apache-2.0 AND OGL-UK-3.0
money.amount
A currency-tagged monetary amount held in integer minor units.
money in TypeScript
1.0.2
py rs ts
17 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
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
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.
unitPrice in TypeScript
1.0.1
py rs ts
27 tests
Apache-2.0
manufacturing.variance
Standard costing variances: material price and usage, labour rate and efficiency, favourable or adverse.
costVariances in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
subscriptions.usage-tiered
Price metered usage against tiers, graduated or volume, with an optional flat fee per tier.
priceUsage in TypeScript
1.0.0
py rs ts
25 tests
Apache-2.0
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
1.0.0
py rs ts
18 tests
Apache-2.0
agri.milk-price
Milk price per litre and payment from a contract's base price, butterfat/protein adjustments and bonuses.
milkPrice in TypeScript
1.0.0
py rs ts
18 tests
Apache-2.0
1.0.0
py rs ts
20 tests
Apache-2.0
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".
amountInWords in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
finance.markup-price
Selling price from a cost and a target margin or markup in basis points, with explicit rounding.
markupPrice in TypeScript
1.0.0
py rs ts
21 tests
Apache-2.0
retail.price-rounding
Snap a price to a price point: charm pricing (.99, .95), nearest 5p or 10p, rounding up, down or to nearest.
roundPrice in TypeScript
1.0.0
py rs ts
25 tests
Apache-2.0
invest.capital-gains-tax Unreviewed
UK Capital Gains Tax for an individual's tax year: losses, annual exempt amount, and the rates by asset and date.
capitalGainsTax in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parseMoney in TypeScript
1.0.0
py rs ts
37 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
finance.margin
Profit on a sale with both the margin and the markup, so the two are never confused.
margin in TypeScript
1.0.0
py rs ts
13 tests
Apache-2.0
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
1.0.0
py rs ts
18 tests
Apache-2.0
1.0.0
py rs ts
9 tests
Apache-2.0
finance.invoice.calculate
Calculate a complete invoice: line nets, VAT per line, totals and a VAT summary grouped by rate.
calculateInvoice in TypeScript
1.0.1
py rs ts
15 tests
Apache-2.0
property.rental-yield Unreviewed
Gross and net rental yield of a let property, in basis points, from annual rent, costs and value.
rentalYield in TypeScript
1.0.1
py rs ts
14 tests
Apache-2.0
money.compare
Compare two amounts of one currency, refusing to compare across currencies; min, max and clamp too.
A group of 4: compareMoney, minMoney, maxMoney, clampMoney
2.0.0
py rs ts
39 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.
basketTotal in TypeScript
1.0.0
py rs ts
10 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.
applyPromotions in TypeScript
1.0.0
py rs ts
23 tests
Apache-2.0
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
1.0.0
py rs ts
21 tests
Apache-2.0
fleet.mileage-allowance
HMRC approved mileage allowance payments for an employee's own vehicle: tax-free amount, taxable excess or relief.
mileageAllowance in TypeScript
1.0.2
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
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
1.0.1
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.
timeOfUseCost in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interimValuation in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
finance.proration
Split an amount into the part used and the part unused over a billing period, losing nothing.
prorate in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
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
1.0.0
py rs ts
24 tests
Apache-2.0
money.split-even
Split an amount into n near-equal parts that add back up to exactly the whole.
splitEven in TypeScript
1.0.0
py rs ts
13 tests
Apache-2.0
money.convert
Convert an amount to another currency at a supplied exact rate, with an explicit rounding mode.
convertMoney in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
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
1.0.0
py rs ts
15 tests
Apache-2.0
finance.bank-reconcile-match
Match bank statement lines to ledger entries by exact amount, a date window and reference similarity, deterministically.
matchBankLines in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.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.
bondYield in TypeScript
1.0.2
py rs ts
27 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.
dividendYield in TypeScript
1.0.1
py rs ts
19 tests
Apache-2.0
property.completion-statement Unreviewed
A buyer's completion statement: price less deposit, ground rent and service charge apportioned to completion, plus fees.
completionStatement in TypeScript
1.0.1
py rs ts
15 tests
Apache-2.0
money.format
Render a monetary amount as text, using the currency's real minor-unit precision.
formatMoney in TypeScript
1.0.0
py rs ts
11 tests
Apache-2.0
money.sum
Total a list of monetary amounts, with an explicit currency for the empty case.
sumMoney in TypeScript
1.0.1
py rs ts
11 tests
Apache-2.0
money.apply-rate
Apply a rate expressed in basis points to a monetary amount, with an explicit rounding mode.
applyRate in TypeScript
1.0.1
py rs ts
22 tests
Apache-2.0
money.allocate
Split an amount across ratios without losing or inventing a single minor unit.
allocate in TypeScript
1.0.1
py rs ts
17 tests
Apache-2.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.
timeBilling in TypeScript
1.0.1
py rs ts
15 tests
Apache-2.0
payroll.statutory-maternity-pay Unreviewed
UK Statutory Maternity Pay: LEL eligibility and 39 weekly amounts, 90% then the lower of 90% or the flat rate.
statutoryMaternityPay in TypeScript
1.0.1
py rs ts
12 tests
Apache-2.0 AND OGL-UK-3.0
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
addMoney in TypeScript
1.0.1
py rs ts
12 tests
Apache-2.0
construction.cis-deduction
Construction Industry Scheme deduction (0, 20 or 30%) on the labour part of a subcontractor payment.
cisDeduction in TypeScript
1.0.2
py rs ts
24 tests
Apache-2.0 AND OGL-UK-3.0
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
1.0.2
py rs ts
15 tests
Apache-2.0 AND OGL-UK-3.0
retail.oss-vat
EU distance-selling VAT: which member state's standard rate applies under OSS and the EUR 10,000 threshold, and the VAT.
ossVat in TypeScript
1.0.1
py rs ts
28 tests
Apache-2.0
professional.wip-valuation
Value unbilled time (work in progress) at cost or charge-out rates, less a write-down percentage.
wipValuation in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
subscriptions.proration
Mid-cycle plan change: credit for unused time on the old plan and charge for the rest of the period on the new one.
prorateChange in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
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
1.0.0
py rs ts
16 tests
Apache-2.0
retail.refund-calculate
Refund for returned items, sharing basket discounts back across the sale so every refund is exact to the penny.
calculateRefund in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
finance.accruals-prepayments
Split an invoice across accounting periods by days of service, for accruals, prepayments and deferred income.
allocateToPeriods in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
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
1.0.0
py rs ts
17 tests
Apache-2.0
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
1.0.0
py rs ts
12 tests
Apache-2.0
finance.fx-revaluation
Unrealised foreign exchange gain or loss on foreign-currency balances revalued at a period-end rate.
fxRevaluation in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
energy.bill-calculate
Electricity or gas bill from two meter reads: energy, standing charge, Climate Change Levy and VAT.
calculateEnergyBill in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
1.0.0
py rs ts
19 tests
Apache-2.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.
insurancePremiumTax in TypeScript
1.0.2
py rs ts
23 tests
Apache-2.0 AND OGL-UK-3.0
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
1.0.1
py rs ts
19 tests
Apache-2.0
fleet.emissions
Vehicle greenhouse gas emissions (grams CO2e) from fuel used or distance, using UK government DESNZ conversion factors.
fleetEmissions in TypeScript
1.0.1
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.
incomeTax in TypeScript
1.0.2
py rs ts
30 tests
Apache-2.0 AND OGL-UK-3.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
retail.shipping-rate
Delivery charge from a dated rate table by service, zone, chargeable weight and size, with a free-over threshold.
shippingRate in TypeScript
1.0.1
py rs ts
20 tests
Apache-2.0
subscriptions.stripe-state
Folds Stripe's subscription and invoice webhook events into one normalised subscription state, in any order.
applyStripeEvent in TypeScript
1.0.0
py rs ts
33 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.
gasds in TypeScript
1.0.2
py rs ts
21 tests
Apache-2.0 AND OGL-UK-3.0
subscriptions.mrr-arr
Monthly and annual recurring revenue from a list of subscriptions, normalising intervals and leaving out trials.
mrrArr in TypeScript
1.1.0
py rs ts
19 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.
roamingCharge in TypeScript
1.0.1
py rs ts
16 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.
rateCall in TypeScript
1.0.1
py rs ts
22 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.
carbonEmissions in TypeScript
1.0.1
py rs ts
17 tests
Apache-2.0 AND OGL-UK-3.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.
fasterPaymentsCheck in TypeScript
1.0.1
py rs ts
24 tests
Apache-2.0
hospitality.service-charge
A discretionary service charge on a bill's eligible lines, as a basis-point rate with explicit rounding.
serviceCharge in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
hospitality.cancellation-charge
Cancellation fee for a booking from a policy of notice bands and the days of notice given.
cancellationCharge in TypeScript
1.0.0
py rs ts
22 tests
Apache-2.0
logistics.freight-rate
Freight charge from a carrier's dated weight-break tariff for a zone, with the fuel surcharge in force on the ship date.
freightRate in TypeScript
1.0.1
py rs ts
26 tests
Apache-2.0
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
1.0.1
py rs ts
30 tests
Apache-2.0 AND OGL-UK-3.0
subscriptions.invoice
A subscription renewal invoice: plan, add-ons and usage, coupon discounts by billing period, and VAT.
renewalInvoice in TypeScript
1.0.0
py rs ts
19 tests
Apache-2.0
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trialBalance in TypeScript
1.0.0
py rs ts
13 tests
Apache-2.0
charity.restricted-funds
Allocate charity spending to restricted funds first, then unrestricted funds, never overdrawing a restricted fund.
allocateFundSpend in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
banking.overdraft-interest
Overdraft interest for a statement period from daily balances, with an interest-free buffer.
overdraftInterest in TypeScript
1.0.0
py rs ts
15 tests
Apache-2.0
telecoms.data-allowance
Mobile data allowance used and remaining, and the overage charge in whole blocks with an optional spend cap.
dataAllowance in TypeScript
1.0.0
py rs ts
18 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