⭐ the project to show your appreciation.
word-gen generates random words in Go and JavaScript. You can create a pattern specifying (English) Nouns, Verbs and Adjectives as well as Base-10 and Hexadecimal digits. It is designed for performance.
The pattern can contain # (base-10 digit), h/H (hexadecimal digit), n/N/Ñ (nouns), a/A/Ã (adjectives), v/V/Ṽ (verbs) and * (any word). \ can be used to escape the special characters.
Upper-case characters generate upper-case words. Tilde characters generate title case words.
import "github.com/romance-dev/word-gen/go"
g := wordgen.New(`学中文:n-v-a-n-####`) // Define pattern. g can be reused concurrently.
println(g.String())Output:
学中文:dog-ran-red-banana-3563const g = Generator(`学中文:n-v-a-n-####`)
console.log(g.String(max)) // set max string length