encoding.hex → hexEncode
Bytes to lowercase hexadecimal text and back (RFC 4648 base16), strictly, identically in every language.
hexEncode in TypeScript, one function of this group
1.0.0
py rs ts
25 tests
Apache-2.0
encoding.utf8 → utf8Encode
Text to UTF-8 bytes and strictly back (RFC 3629), so hashing and signing see the same bytes in every language.
utf8Encode in TypeScript, one function of this group
1.0.0
py rs ts
25 tests
Apache-2.0
encoding.base64 → base64Encode
Bytes to base64 and base64url text and back (RFC 4648), with strict decoding, identically in every language.
base64Encode in TypeScript, one function of this group
1.0.0
py rs ts
46 tests
Apache-2.0
encoding.base32 → base32Encode
Bytes to RFC 4648 base32 text (A-Z, 2-7) and back, strictly, as authenticator-app secrets are written.
base32Encode in TypeScript, one function of this group
1.0.0
py rs ts
36 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.
sha256 in TypeScript
1.0.0
py rs ts
13 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.
A group of 3: signJwt, verifyJwt, decodeJwt
1.0.0
py rs ts
54 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.
pbkdf2Sha256 in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
auth.password-hash
Hash a password for storage as pbkdf2_sha256$iterations$salt$hash, verify one in constant time, and spot weak hashes.
A group of 3: hashPassword, verifyPassword, passwordNeedsRehash
1.0.0
py rs ts
36 tests
Apache-2.0
crypto.sha1
The SHA-1 digest of a byte string (FIPS 180-4), for HMAC-SHA1 in HOTP/TOTP codes; not for new signatures.
sha1 in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
monitor.parse-access-log
Parse one Apache/NCSA Common or Combined Log Format access log line; null for a line in neither format.
parseAccessLog in TypeScript
1.0.0
py rs ts
21 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.
buildSscc in TypeScript
1.1.0
py rs ts
16 tests
Apache-2.0
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
A group of 4: parseHex, toHex, srgbToLinear, linearToSrgb
1.0.1
py rs ts
39 tests
Apache-2.0
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
1.0.0
py rs ts
12 tests
Apache-2.0
payments.stripe-checkout Integration · does I/O TypeScript only
Start a Stripe Checkout session and verify Stripe's signed webhooks, with a local stand-in for development.
A group of 3: createCheckoutSession, verifyWebhook, signWebhook
1.1.0
ts
41 tests
MIT
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
1.0.0
py rs ts
13 tests
Apache-2.0
auth.totp
Authenticator-app two-factor codes (TOTP RFC 6238, HOTP RFC 4226): secret, QR URI, codes, verify with window and drift.
A group of 5: totpSecret, totpUri, hotpCode, totpCode, verifyTotp
1.0.0
py rs ts
80 tests
Apache-2.0
crypto.hmac-sha1
HMAC-SHA1 of a message under a secret key (RFC 2104, RFC 2202), the MAC under HOTP and TOTP codes.
hmacSha1 in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
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
1.0.0
py rs ts
20 tests
Apache-2.0
todo.export-csv
Write todos as a CSV file (RFC 4180) with one column per field, for backups, spreadsheets and other apps.
exportCsv in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
text.initials
Initials from a personal name for avatars and signatures: "Jean-Paul Sartre" is "JPS".
initials in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
text.slugify
Turn a title into a lowercase ASCII URL slug, transliterating common accented Latin letters.
slugify in TypeScript
1.0.0
py rs ts
21 tests
Apache-2.0
text.normalise-name
Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.
normaliseName in TypeScript
1.0.0
py rs ts
23 tests
Apache-2.0
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
text.integer-to-words
Spell out a whole number in British English words, with "and" the way a cheque writes it.
integerToWords in TypeScript
1.0.0
py rs ts
25 tests
Apache-2.0
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in TypeScript
1.0.0
py rs ts
17 tests
Apache-2.0
manufacturing.oee
Overall equipment effectiveness (availability x performance x quality) in basis points, from times and counts.
overallEquipmentEffectiveness in TypeScript
1.0.0
py rs ts
18 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
text.mask
Mask all but the last n characters of a card, account or phone number, optionally keeping separators.
mask in TypeScript
1.0.0
py rs ts
16 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
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
lending.early-settlement Unreviewed
Early settlement figure and rebate on UK regulated consumer credit, per the Early Settlement Regulations 2004.
earlySettlement in TypeScript
1.0.1
py rs ts
18 tests
Apache-2.0
todo.recurrence-label
English text for a repeating todo's chip: "Every weekday", "Every 2 weeks on Monday", "Every month on the 31st".
recurrenceLabel in TypeScript
1.0.0
py rs ts
30 tests
Apache-2.0
collections.search-text
Filter records by a case-insensitive substring match across named fields, in input order.
searchText in TypeScript
1.0.0
py rs ts
20 tests
Apache-2.0
logistics.hs-code-validate
Check the format of a commodity code: 6-digit HS, 8-digit CN or 10-digit TARIC/UK code, with chapter and heading checks.
validateHsCode in TypeScript
1.0.0
py rs ts
16 tests
Apache-2.0
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
1.0.0
py rs ts
19 tests
Apache-2.0
fleet.vehicle-depreciation
A vehicle's current value from its cost, age and mileage, on retention curves the caller supplies, exactly.
vehicleDepreciation in TypeScript
1.0.0
py rs ts
20 tests
Apache-2.0
text.truncate
Shorten text to a maximum length on a word boundary and add an ellipsis, counting Unicode code points.
truncate in TypeScript
1.0.0
py rs ts
18 tests
Apache-2.0
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
validation.lei
Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.
validateLei in TypeScript
1.0.0
py rs ts
14 tests
Apache-2.0
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
units.convert
Convert length, mass, area, volume, temperature and energy between units, exactly, as decimal text.
convertUnits in TypeScript
1.0.0
py rs ts
31 tests
Apache-2.0
auth.normalise-email
Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.
normaliseEmail in TypeScript
1.0.0
py rs ts
12 tests
Apache-2.0
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
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
logistics.demurrage
Demurrage or detention charge for a container: free days, then a tiered daily rate from the carrier's tariff.
demurrage in TypeScript
1.0.0
py rs ts
22 tests
Apache-2.0
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
1.0.0
py rs ts
22 tests
Apache-2.0
education.degree-classification
UK honours degree class (First, 2:1, 2:2, Third) from module marks and credits, weighted by level.
degreeClassification in TypeScript
1.0.0
py rs ts
23 tests
Apache-2.0
logistics.incoterm-responsibility
Who pays which costs and where risk passes under an Incoterms 2020 rule, from EXW to DDP, FOB and CIF.
incotermResponsibility in TypeScript
1.0.1
py rs ts
15 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