Compact Notation
When enabled, pasting shorthand values like "1k" or "2.5m" expands them to full numbers. Expansion uses string arithmetic - no precision loss.
| Suffix | Multiplier | Example |
|---|---|---|
| k, K | ×1,000 | "1k" → "1000" |
| m, M | ×1,000,000 | "1.5m" → "1500000" |
| b, B | ×1,000,000,000 | "2B" → "2000000000" |
| t, T | ×1,000,000,000,000 | "2.5T" → "2500000000000" |
typescript
import { NumoraInput } from 'numora'
const input = new NumoraInput(container, {
enableCompactNotation: true,
decimalMaxLength: 18,
// Paste "1k" → "1000"
// Paste "1.5m" → "1500000"
// Paste "0.5k" → "500"
// Paste "2.75m" → "2750000"
})Expansion only happens on paste - users cannot type compact notation character by character. The expanded value then passes through the rest of the sanitization and formatting pipeline.