@jharrilim/madlibs
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

Package Sidebar

Install

npm i @jharrilim/madlibs

Weekly Downloads

0

Version

0.1.2

License

MIT

Unpacked Size

8.94 kB

Total Files

13

Last publish

Collaborators

  • jharrilim