-
-
Save videlais/1a5f359c2b94f8b9448478b9f071d8f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tracery = require("tracery-grammar"); | |
var symbols = { | |
"animals": ["deer", "fox", "rabbit"] | |
}; | |
var grammar = tracery.createGrammar(symbols); | |
var results = grammar.flatten("There was a #animals# in the forest."); | |
console.log(results); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment