Skip to content

Commit 27289cf

Browse files
authored
refactor: Mask parser improvements (#1734)
* Reduced intermediate collections and allocations while parsing and replacing parts of the mask * Cleaned up some logic around applying/replacing parts of the mask. * Dropped some obsolete internal methods. * Better API documentation.
1 parent 9536ed3 commit 27289cf

File tree

2 files changed

+280
-146
lines changed

2 files changed

+280
-146
lines changed

src/components/mask-input/mask-parser.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ describe('Mask parser', () => {
151151
const value = 'ak47';
152152
parser.mask = '####';
153153
const result = parser.replace(parser.apply(), value, 0, value.length);
154-
expect(result.value).to.equal('____');
154+
expect(result.value).to.equal('47__');
155155
});
156156

157157
it('replace (invalid end)', () => {

0 commit comments

Comments
 (0)