Dyljyn / string-mask-ts

Mask a string with a single line of code
MIT License
1 stars 0 forks source link
easy-to-use masks pattern recursion recursive single-class string string-mask typescript

StringMask

This repository is based on the concept of the-darc/string-mask.

Reason for this library

At the time of writing (October 2018), the original library (the-darc/string-mask) had a few flaws that caught my attention.

As I love the concept of the library: a single, independent implementation that can format a string according to a pattern. I want this concept to be more usable by the open-source community.

  1. I have copied over the original tests to maintain the original specifications.

    The tests were refactored because they were written with mutability.

  2. The source code is written from scratch and meant to be more readable, so that the community is able to understand and contribute.

  3. Breaking changes towards the original specifications will be avoided as long as possible.

    The repository will use Semantic versioning.