Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

madlibify

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

madlibify

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

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 20 Mar 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc