auto-formatter is a browser-based library that formats input fields as you type, supporting phone numbers (e.g., (XXX) XXX-XXXX, XXXXX-XXXXX), credit card numbers (XXXX XXXX XXXX XXXX), and dates (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD). Version 0.1.0, released in 2015, is the sole and final version. It is a simple, dependency-free solution for client-side formatting, using a pattern-based approach with optional left-to-right (LTR) or right-to-left (RTL) direction, max length limiting, and recurring pattern support. The package has not been updated since 2015 and remains in maintenance mode. Key differentiator: zero dependencies and a straightforward API for real-time formatting without complex configuration.
npm install auto-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initializing AutoFormatter on an input element and using the static format method.
Use a <script> tag from unpkg or include the file manually. Do not attempt to import via ES modules or CommonJS.
Consider migrating to a modern alternative like Cleave.js or IMask for ongoing support and features.
The method appears to have no return value in the source. Use the instance method with a target node instead to see formatted output in the input.
Ensure <script src="path/to/auto-formatter.js"> is placed before any code using AutoFormatter.
Load via <script> tag in browser; the package does not export a module.
Verify the selector matches a valid DOM element before instantiation.
No dependency data recorded yet.