Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
/ tidy.js Public archive

🧹 tidy.js filters strings for swearing, harassment, URLs, advertising and more.

License

Notifications You must be signed in to change notification settings

fill-it-in/tidy.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tidy.js

🧹 tidy.js filters strings for swearing, harassment, URLs, advertising and more.

The blacklist.json file can be outdated!

scan(String) function:

Scans String for blacklisted words.

scan('ass');
// Returns true
scan('Hello');
// Returns false

check(String) function:

Checks String for blacklisted TLDs.

check('github.com');
// Returns true
check('github');
// Returns false

censor(String, int) function:

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'

License

MIT

About

🧹 tidy.js filters strings for swearing, harassment, URLs, advertising and more.

Resources

License

Stars

Watchers

Forks