UNPKG

@kbfront/kb-ui

Version:

KB React UI Library

16 lines 509 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { mobileMasked: function (input) { if (input) { if (input.startsWith('+')) { return input.replace(/(994)(\d{0,2})(\d{0,3})(\d{0,2})(\d{0,2})/, '$1 $2 ***-**-$5'); } return input.replace(/(\d{0,2})(\d{0,3})(\d{0,2})(\d{0,2})/, '(0$1)***-**-$4'); } else { return input; } }, }; //# sourceMappingURL=number.js.map