(standard, base)
| 38 | * @returns {Object} Configuration object |
| 39 | */ |
| 40 | export function getBaseConfiguration(standard, base) { |
| 41 | // Use cached lookup table for better performance |
| 42 | if (STANDARD_CONFIGS[standard]) { |
| 43 | return STANDARD_CONFIGS[standard]; |
| 44 | } |
| 45 | |
| 46 | // Base override |
| 47 | if (base === 2) { |
| 48 | return { isDecimal: false, ceil: 1024, actualStandard: IEC }; |
| 49 | } |
| 50 | |
| 51 | // Default |
| 52 | return { isDecimal: true, ceil: 1000, actualStandard: JEDEC }; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * Optimized zero value handling |
no outgoing calls
no test coverage detected