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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
money.amount
A currency-tagged monetary amount held in integer minor units.
money in TypeScript
1.0.2
py rs ts
17 tests
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
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
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
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
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
1.0.0
py rs ts
20 tests
retail.price-per-unit
Unit price for shelf-edge labels: price per kg, per 100 g, per litre, per 100 ml, per metre or per item.
unitPrice in TypeScript
1.0.1
py rs ts
27 tests
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
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
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
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
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
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
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
1.0.0
py rs ts
9 tests
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
money.add
Add, subtract and negate monetary amounts, refusing to mix currencies.
addMoney in TypeScript
1.0.1
py rs ts
12 tests
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
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
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
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
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
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
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
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
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
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
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
1.0.0
py rs ts
19 tests
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
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
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
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
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
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
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
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
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
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
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
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
1.0.0
py rs ts
25 tests
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
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
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
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
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
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
1.0.0
py rs ts
24 tests
retail.loyalty-points
Loyalty points for a purchase: redeem in blocks, earn on what is paid, with tier multipliers.
loyaltyPoints in TypeScript
1.0.0
py rs ts
19 tests
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
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
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
retail.gift-card-balance
Apply a payment from a gift card, redeeming part of the balance or all of it, and say what is still due.
redeemGiftCard in TypeScript
1.0.0
py rs ts
11 tests
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
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
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