0.1.2 • Published 5 years ago

@jharrilim/madlibs v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

MadLibs

Build Status Version Downloads

An entirely useless MadLibs library that demonstrates how you can process tagged template strings.

Install

npm i @jharrilim/madlibs

Usage

import { MadLibs } from '@jharrilim/madlibs';

const madlibs = new MadLibs({
    adjective: ['speedy'],
    noun: ['sloth', 'ocean'],
    'verb ending in ing': ['flying'],
});

console.log(madlibs.compile`
The ${"adjective"} ${"noun"} was ${"verb ending in ing"} over the ${"noun"}
`.join(''));

// Output: The speedy sloth was flying over the ocean