Skip to content

`The ${"adjective"}, ${"adjective"}, ${"noun"} jumped over the ${"adjective"} ${"noun"}`

License

Notifications You must be signed in to change notification settings

jharrilim/madlibs

Repository files navigation

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

About

`The ${"adjective"}, ${"adjective"}, ${"noun"} jumped over the ${"adjective"} ${"noun"}`

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published