Functional Weave
Code in TypeScript

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.
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.
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).
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.shape
SVG path strings for lines, areas, steps, monotone curves, bars, arcs and pie slices, identical in every language.
react.form.styles React ^19 · TypeScript only
An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.
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.
text.mask
Mask all but the last n characters of a card, account or phone number, optionally keeping separators.
charts.axis
Axis geometry as data: tick positions, tick marks, label anchors and gridlines for number, time and category axes.
charts.color
Hex colours to RGB and back, and sRGB channels to linear light and back, identically in every language.
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.