From: Chris Duncan Date: Thu, 2 Oct 2025 04:26:18 +0000 (-0700) Subject: Document units of measure. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=46088eb269a3f22b7ea2a9c9c16f55e5c06d72a3;p=libnemo.git Document units of measure. --- 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