Skip to content

Instantly share code, notes, and snippets.

@videlais
Created Oct 25, 2018
Embed
What would you like to do?
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