Skip to content

nathanchapman/mayonnaise.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mayonnaise.js version downloads

JavaScript fake data generator, courtesy of Patrick Star.

Is mayonnaise an instrument?

Installation

npm install mayonnaise.js

Usage

const mayonnaise = require('mayonnaise.js');

// Text is generated from Patrick's wonderful quotations
const sentence = mayonnaise.sentence;
const paragraph = mayonnaise.sentences(4);
const title = mayonnaise.title;
const text = mayonnaise.text;
const description = mayonnaise.description;
const shortDescription = mayonnaise.short_description;
const string = mayonnaise.string;
const word = mayonnaise.word;
const words = mayonnaise.words(7);
const arrayofWords = mayonnaise.array_of_words(7);
const letter = mayonnaise.letter;

// User data is generated from SpongeBob characters
const name = mayonnaise.name;
const username = mayonnaise.username;
const firstName = mayonnaise.first_name;
const lastName = mayonnaise.last_name;
const fullName = mayonnaise.full_name;
const catchPhrase = mayonnaise.catch_phrase;

// place and location return different locations from the SpongeBob universe
const place = mayonnaise.place;
const location = mayonnaise.location;

// timecards are now available
const timecard = mayonnaise.timecard;

...

API

mayonnaise.js uses casual under the hood, so you can use all of the generators specified in their documentation as well as various locales.