0.1.0 • Published 1 year ago

any-template v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

any-template

A tiny package for parsing and stringifying tagged template strings. Make a tiny template in seconds:

import template from "any-template";
const greeting = template`Good ${"timeOfDay"}, ${"name"}!`;
greeting.parse("Good morning, friend!") // { timeOfDay: "morning", name: "friend" }
greeting.stringify({ timeOfDay: "evening", name: "Pikachu" }) // "Good evening, Pikachu!"