Functional Weave
Code in Rust

Organisations / anterra

Anterra

1 member

Money, tax and invoicing capabilities for UK and Irish business software.

Published functions 200

charts.extent
The minimum and maximum of a series as [min, max], skipping gaps (null), or null when there is no value.
charts.scale
Map data values onto screen positions and back: linear, log, time, band and point scales, and nice domains.
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
math.exp
e to the power x from + - * / only, so TypeScript, Python and Rust return the same double for the same input.
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.
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
encoding.utf8
Text to UTF-8 bytes and strictly back (RFC 3629), so hashing and signing see the same bytes in every language.
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.
math.clamp
Clamp an integer to an inclusive range, refusing a range whose bounds are the wrong way round.
math.pow
base to the power exponent from + - * / only, exact by squaring for whole exponents, identical in every language.
net.cidr
CIDR blocks: network, broadcast, first and last host, host count, netmask and prefix, and membership.
net.ipv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
net.port
Check a TCP/UDP port number and name the IANA service registered on it, with its system/user/dynamic range.
react.form.button React ^19 · TypeScript only
A form button in primary, secondary or warning style that stays focusable while loading (GOV.UK button).
react.form.form-field React ^19 · TypeScript only
Wire a label, hint and error message to one form control by id, the accessible way (GOV.UK form group pattern).
react.form.styles React ^19 · TypeScript only
An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.