It's possible to use vanilla mask only? #753
-
What problem you are trying to solve? I would like to know if it is possible to use the mask functions with JavaScript only, without DOM dependency. The goal is to use mask formatting with Node or React Native, in places that are not just inputs. Describe the solution you'd like Usage suggestion: const masker = IMask({
mask: '+{00} (00) {0} 0000-0000'
});
const masked = masker.format('+5544999594455');
console.log(masked);
// +55 44 9 9959-4455 Describe alternatives you've considered In the past I've used Vanilla Masker, but the library has been abandoned and doesn't support TypeScript. |
Beta Was this translation helpful? Give feedback.
Answered by
uNmAnNeR
Sep 28, 2022
Replies: 1 comment 1 reply
-
hey! you can use pipes for it https://imask.js.org/guide.html#pipe |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
douglasjunior
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey! you can use pipes for it https://imask.js.org/guide.html#pipe