frase-variation
v1.0.0
Published
Create variation of frases based in pattern string like [hello, hi] friend, and they random variations like hi friend, or hello friend. Check documentation.
Downloads
5
Maintainers
Readme
Frase Variation
To create variagion of frases You can use that to create test and fake content to seed your project or to create a comment bot
If you use that project to comercial propouse please donate to paypal: [email protected] Thanks
Usage
let frase = require("frase-variation")
let myRandomFraseVariation = frase('[Hi|Hello], How [are|R] You?')
console.log(myRandomFraseVariation)
That code can create 4 combinations of word:
- Hi, How are You?
- Hi, How R You?
- Hello, How are You?
- Hello, How R You?
If You use mor tags [] of options, the combinations raised to numbers of combinations. The previous example have 2 combinations more 2 others combination. 2 to the power of 2 . If You have more 2 combinatinos, 2 pow 2 pow 2 possible of combinations.
They random result to return in frase function