This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Converts a number from one base to another. Supports bases 2 through 36 | |
| * (binary, octal, decimal, hexadecimal, base-36, etc.). | |
| * | |
| * @param {string | number} number - The number to convert (as string or number) | |
| * @param {string | number} fromBase - Source base (2–36) | |
| * @param {string | number} toBase - Target base (2–36) | |
| * @returns {string} The number represented in the target base (uppercase letters) | |
| * @throws {Error} If bases are invalid, number contains invalid digits, or conversion fails | |
| * |