Skip to content

Reusable strings

Latest
Compare
Choose a tag to compare
@zemlanin zemlanin released this 02 Aug 09:35
· 5 commits to master since this release

make yassium strings reusable:

const y = require("yassium");
const tmpl = y`<${y.tag}>${y.content}</${y.tag}>`;

tmpl({ tag: "h1", content: "Title" }) === "<h1>Title</h1>";
tmpl({ tag: "h2", content: "Subtitle" }) === "<h2>Subtitle</h2>";