ui-mask
ui-mask copied to clipboard
improvement: support string mask pattern in maskDefinitions
as RegExp json serialization is problematic, it's a good idea to let developer pass string representation of pattern regex.
So from now the following maskDefinitions both work:
maskDefinitions = {
a: /[a-z]/
}
maskDefinitions = {
a: '[a-z]'
}