Generate random monikers, or nicknames, in Scala.
Version | Supported Scala Versions |
---|---|
0.0.1 | 2.13.x, 2.12.x |
"com.github.halfmatthalfcat" %% "scala-moniker" % "0.0.1"
import com.github.halfmatthalfcat.moniker._
val moniker: Moniker = Moniker()
val nickname: String = moniker.getRandom()
// weathered store
import com.github.halfmatthalfcat.moniker._
val moniker: Moniker = Moniker()
val nicknames: Seq[String] = moniker.getRandoms(count = 5)
// List(coal kilometer, level rice, cobalt library, crunchy hub, new tangent)
import com.github.halfmatthalfcat.moniker._
val moniker: Moniker = Moniker()
val nickname: String = moniker.getRandom(delimiter = "-")
// crabby-liner
You can specify which lists you want to generate from when instantiating a new instance of Moniker.
import com.github.halfmatthalfcat.moniker._
val moniker: Moniker = Moniker(
adjectives = Seq(
Adjective.Appearance,
Adjective.Colors,
),
nouns = Seq(
Noun.Astronomy,
Noun.Containers,
)
)
The word lists are based on the upstream repository imsky/wordlists and are synced periodically. Any request for more words should be asked/added there.