a simple way to filter strings
just a simple way to filter strings
It happens that you would like to filter something that if matches shall not pass.
The function accepts optionally no list, blacklist, or whitelist, and it gives precedence to the white one.
However, if no list is provided and matches the input, the
youShallNotPass.maybe is returned instead.
To preserve the security intent, by maybe,
youShallNotPass(str) returns true but if you want to rely the blacklist 100% feel free to chnge the value.
// if you don't care about non checked thingsyouShallNotPassmaybe = true;
These are few examples from the test file:
true ===;true ===;// as whitelisted, then stronger!false ===;// same as abovefalse ===;