🧹 tidy.js filters strings for swearing, harassment, URLs, advertising and more.
The blacklist.json
file can be outdated!
Scans String for blacklisted words.
scan('ass');
// Returns true
scan('Hello');
// Returns false
Checks String for blacklisted TLDs.
check('github.com');
// Returns true
check('github');
// Returns false
Removes either only blacklisted words/TLDs or both from String.
censor('fooass', 1);
// Returns 'foo'
censor('foo.com', 2);
// Returns 'foo'
censor('fooassbar.com', 3);
// Returns 'foobar'
MIT