Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nathanchapman/mayonnaise.js
🎺 Fake data generator for JavaScript, courtesy of Patrick Star
https://github.com/nathanchapman/mayonnaise.js
casual data-generator faker generator javascript lorem-ipsum mocking placeholder placeholder-text spongebob
Last synced: about 10 hours ago
JSON representation
🎺 Fake data generator for JavaScript, courtesy of Patrick Star
- Host: GitHub
- URL: https://github.com/nathanchapman/mayonnaise.js
- Owner: nathanchapman
- License: mit
- Created: 2016-04-18T02:48:31.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T16:20:23.000Z (8 months ago)
- Last Synced: 2024-11-02T13:04:48.913Z (12 days ago)
- Topics: casual, data-generator, faker, generator, javascript, lorem-ipsum, mocking, placeholder, placeholder-text, spongebob
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/mayonnaise.js
- Size: 63.5 KB
- Stars: 71
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mayonnaise.js [![version](https://img.shields.io/npm/v/mayonnaise.js.svg)](https://www.npmjs.com/package/mayonnaise.js) [![downloads](https://img.shields.io/npm/dt/mayonnaise.js.svg)](https://www.npmjs.com/package/mayonnaise.js)
JavaScript fake data generator, courtesy of Patrick Star.
> Is mayonnaise an instrument?
## Installation
```sh
npm install mayonnaise.js
```## Usage
```javascript
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](https://github.com/boo1ean/casual) under the hood, so you can use all of the generators specified in their [documentation](https://github.com/boo1ean/casual#embedded-generators) as well as various locales.