A rust-written regex based adaptable string-manipulation pipeline. Can be used to censor profanity or quickly scan large bodies of text for certain patterns.
npm i regexcensorThis module uses Rusts' Regex Crates, read more at Rust Regex and Fancy Regex
import Filter from 'regexcensor'
const filter = Filter()- Run
npm run testto test the code with mocha. - Run
npm run checkto test different phrases in the console. - Run
npm run codegento generate rust code files fromlatin.txtanduniversal.txt - Run
npm run buildto build web assembly from rust code in/libto/build - Run
npm run watto build web assembly textfile from wasm in/build
Inspired from: https://www.cs.cmu.edu/~biglou/resources/bad-words.txt Inspired from: https://github.com/Minehut/MinehutBOT/blob/master/src/util/censorRules.ts
No content was directly cloned or copied, I took my time to rethink every regex. The only thing that are similar are the words. This statement does not apply to latin.txt whose characters are directly taken from https://github.com/dundalek/latinize/blob/master/latinize.js