Socket
Socket
Sign inDemoInstall

madlibify

Package Overview
Dependencies
22
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    madlibify

simple module for creating a madlibs-like game :-)


Version published
Maintainers
1
Install size
5.86 MB
Created

Readme

Source

Madlibify

Create your own madlibs word game!

To use

var mads = require('madlibify');

var text = "The quick {{color1}} {{noun1}} jumps over the lazy {{noun2}}";

// Parse out the fill-in-the-blanks
var blanks = mads.parse(text); 
console.log(blanks); // ["color1", "noun1", "noun2"]

// Fill in the blanks!
var serious = {
  color1: 'brown',
  noun1: 'fox',
  noun2: 'dog'
};
var madlibs = mads.compile(text, serious);
console.log(madlibs); // The quick brown fox jumps over the lazy dog

// Be silly!
var silly = {
  color1: 'blue',
  noun1: 'truck',
  noun2: 'tree'
};
var madlibs = mads.compile(text, silly);
console.log(madlibs); // The quick blue truck jumps over the lazy tree

FAQs

Last updated on 20 Mar 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc