For developers
The library is small: two functions, one options object, and typed errors. Every output on this page is computed by the library at build time, not typed by hand.
Install from source
git clone https://github.com/andifathulms/terbilangcd terbilangpnpm installpnpm build:lib
Builds dist/ — ESM, CJS, and type declarations. No runtime dependencies.
API
Nothing is thrown from the public surface. Every call returns a Hasil: { type: "ok", nilai } or { type: "galat", galat }.
Options
Every option may be passed partially; anything omitted takes its default. The keys are stable — the converter uses the same keys in its URL hash. The usage behind each choice is on the Rules page.
Refusals
The library refuses rather than guesses. Every error carries a type you can switch over exhaustively and a message naming exactly what failed.