From 46088eb269a3f22b7ea2a9c9c16f55e5c06d72a3 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 1 Oct 2025 21:26:18 -0700 Subject: [PATCH] Document units of measure. --- src/lib/tools.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/tools.ts b/src/lib/tools.ts index 59ca5d4..612cbca 100644 --- a/src/lib/tools.ts +++ b/src/lib/tools.ts @@ -17,7 +17,15 @@ type SweepResult = { export class Tools { /** - * Converts a decimal amount of nano from one unit divider to another. + * Converts a decimal amount of nano from one unit divider to another. Case- + * insensitive valid units are as follows: + * + * - 10⁰: RAW + * - 10²⁴: RAI, NYANO + * - 10²⁷: KRAI, PICO + * - 10³⁰: MRAI, NANO + * - 10³³: KNANO + * - 10³⁶: MNANO * * @param {(bigint|number|string)} amount - Decimal amount to convert * @param {string} inputUnit - Current denomination -- 2.47.3