Skip to content

How can I add a static prefix to a random string? #1548

Answered by dubzzz
thislooksfun asked this question in Q&A
Discussion options

You must be logged in to vote

Something like the snippet below should do what you are looking for:

fc.hexaString({ minLength: 6, maxLength: 6 })
 .map(s => `#${s}`)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by thislooksfun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants