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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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