A reactive number formatter for Svelte + TypeScript inputs, version 1.2.1. It provides real-time formatting (decimal, currency, percentage), input validation, locale-aware formatting, min/max validation, prefix/suffix support, and increment/decrement utilities. Released under MIT, with TypeScript type definitions included. Differentiators: Svelte store integration with reactive updates, comprehensive validation, and a simple bindable handler property for input elements.
npm install svelte-number-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a NumberFormatter with currency options and logs formatted, raw, and numeric values.
Always set 'handler' property to input values; 'formatted' is read-only and updated automatically.
Subscribe to formatter.validation to detect invalid inputs.
Use formatter.value (number) instead of formatter.raw for arithmetic.
Move formatter instantiation to the script section of your Svelte component, before using it in markup.
Install the package and ensure your tsconfig.json includes 'node_modules/@types' or the package's types.
No dependency data recorded yet.