Functional Weave
Code in Python

Organisations / anterra

Anterra

1 member

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

Published functions 200

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.
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).
math.clamp
Clamp an integer to an inclusive range, refusing a range whose bounds are the wrong way round.
math.exp
e to the power x from + - * / only, so TypeScript, Python and Rust return the same double for the same input.
net.ipv6
Parse IPv6 addresses and write them in RFC 5952 canonical form: lower-case, zeros compressed, IPv4 embedded.
text.mask
Mask all but the last n characters of a card, account or phone number, optionally keeping separators.
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.
math.pow
base to the power exponent from + - * / only, exact by squaring for whole exponents, identical in every language.
react.form.button React ^19 · TypeScript only
A form button in primary, secondary or warning style that stays focusable while loading (GOV.UK button).
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
charts.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.