empanada
v0.2.4
Published
Simple data mock generator
Downloads
28
Maintainers
Readme
Empanada
Simple data mock generator.
Installation
npm install empanada
How to use
CJS
const { createRandomWords } = require('empanada');
ESM
import { createRandomWords } from 'empanada';
UMD
Node/Bundler
import { createRandomWords } from 'empanada/build/umd/empanada.min.js';
Browser
<script src="https://unpkg.com/empanada@latest/build/umd/empanada.min.js"></script>
<script>
const { createRandomWords } = window.empanada;
</script>
API
LOREM_IPSUM: string
A long lorem ipsum text example.
createRandomWords(length: number = 3): string
Create a string with random words.
import { createRandomWords } from 'empanada';
console.log(createRandomWords(4));
// "amet nostrud lorem deserunt"
createRandomEmail(): string
Create a string with a random email address ending in ".com".
import { createRandomEmail } from 'empanada';
console.log(createRandomEmail());
// "[email protected]"