red-perfume / red-perfume-css

Library for atomizing strings of CSS
https://red-perfume.github.io
MIT License
3 stars 0 forks source link

Allow passing in array of bad strings to remove from uglied classes #3

Open TheJaredWilcurt opened 3 years ago

TheJaredWilcurt commented 3 years ago

.rp__asdf1234 uses the .rp__ prefix, followed by a Base 36 encoded number that starts at 0 and increments. This means that "bad words" can be found in class names. If people are running a website/app aimed at children, religious, political, etc audiences, they may not want bad words in their production builds.

Though the more words passed in, the slower a build could potentially be if it hits a large number that starts with that word. But that's up to them, as they are the ones passing in the array of strings.