]> git.codecow.com Git - libnemo.git/commitdiff
Document units of measure.
authorChris Duncan <chris@zoso.dev>
Thu, 2 Oct 2025 04:26:18 +0000 (21:26 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 2 Oct 2025 04:26:18 +0000 (21:26 -0700)
src/lib/tools.ts

index 59ca5d4659dc728c17bc0afd8f07d27e2895e2d6..612cbcad0c1a231a23bfbc3ef6e659d5081fead7 100644 (file)
@@ -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