String formatter library for applying and removing masks (e.g., phone, ZIP code) with support for multiple mask patterns and automatic best-match selection. Current stable version: 1.0.0 (no recent updates). TypeScript definitions included. Lightweight alternative to libraries like `cleave.js` or `imask`; focus on simplicity and type safety.
npm install mascarationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows single mask, multiple masks with auto-detect, and unmasking.
Order masks from most to least restrictive pattern.
Use '#' for each digit position; e.g., '###-###-####' for US phone.
Ensure input to unmask contains only digits and mask symbols.
Use `import { formatter } from 'mascaration'`.Run `npm install mascaration` and check spelling.
Wrap the mask in an array: `formatter(['(##) ####-####'], '1234')`.
No dependency data recorded yet.