Options
All
  • Public
  • Public/Protected
  • All
Menu

Contains useful predefined mask factories you can use to create your own simple formatters.

Hierarchy

Index

Properties

Properties

AlphaNumeric: MaskFactory

Factory to create a mask where # is treated as any digit (0-9) and X represents any alphabetic character (a-z).

example
const phoneMask = formatters.utils.MASKS.AlphaNumeric('(###) ###-####');
const asPhoneNumber = formatters.utils.withMask(String, phoneMask);
console.log(asPhoneNumber(1234567890)); // '(123) 456-7890'