ngx-mask-fixed
Version:
awesome ngx mask
28 lines (27 loc) • 783 B
JavaScript
import { InjectionToken } from '@angular/core';
export var config = new InjectionToken('config');
export var NEW_CONFIG = new InjectionToken('NEW_CONFIG');
export var INITIAL_CONFIG = new InjectionToken('INITIAL_CONFIG');
export var initialConfig = {
sufix: '',
prefix: '',
clearIfNotMatch: false,
showTemplate: false,
dropSpecialCharacters: true,
specialCharacters: ['/', '(', ')', '.', ':', '-', ' ', '+', ',', '@', '[', ']'],
patterns: {
'0': {
pattern: new RegExp('\\d'),
},
'9': {
pattern: new RegExp('\\d'),
optional: true
},
'A': {
pattern: new RegExp('\[a-zA-Z0-9\]')
},
'S': {
pattern: new RegExp('\[a-zA-Z\]')
}
}
};