Skip to content
/ puf Public

Go service to verify and prevent harmful usernames

License

Notifications You must be signed in to change notification settings

ecorreiax/puf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

puf

Go Report Card GitHub go.mod Go version (subdirectory of monorepo) GitHub GitHub issues

PUF (Pejorative Username Filter) is a package built in Go that uses bloom's filter to validate if a specific username is definitely not present in a dataset that might represent a pejorative username that shouldn't be used.

Why use puf

With puf, you can quickly check a username against our hand-picked dataset to make sure it's cool with community rules. That way, we all get to hang out in a safer space. We're always tweaking our dataset to keep up with the latest hacks.

Install

With a correctly configured Go toolchain:

go get -u github.com/ecorreiax/puf

Examples

Kick things off by passing a username string to the Check() method. This returns a boolean, tipping you off if the username is invalid or not.

func createUser() {
  u := "username"
  invalid := puf.Check(u)
  if invalid {
   // abort creation
  }
  // continue creation
}

Core team

License

This project is under MIT License.

About

Go service to verify and prevent harmful usernames

Resources

License

Stars

Watchers

Forks