@ryanforever/tracery
v1.0.7
Published
a story-grammar generation library for javascript
Downloads
4
Readme
tracery
This is a simplified implimentation of tracery by galaxykate.
"Tracery is a super-simple tool and language to generate text."
const Tracery = require("@ryanforever/tracery")
const tracery = new Tracery({
origin: ["#hello# #world# #emoji#"],
hello: ["hello", "hey", "hi"],
world: ["world", "earth", "planet earth"],
emoji: ["🌎", "🌍", "🌏"]
})
tracery("hello")
// hey
tracery("origin")
// hello planet earth 🌎