Dummy data generator for local development, demos and testing purposes.
npm i -D dumdum
import DumDum from "dumdum";
const dumdum = DumDum.create();
// Plain text with a maxLength of 50:
const plainText1 = dumdum.text(50);
console.log(plainText1);
// Plain text with a minLength of 100 and a maxLength of 200:
const plainText2 = dumdum.text([100, 200]);
console.log(plainText2);
- HTML generator (
text()
generator) - Markdown generator (
text()
generator) - Number generator
- Chinese localization
- Japanese localization
- Portuguese localization
- Spanish localization
- Russian localization
- Questions support (
text()
generator) - Increase maximum length to
1,000
.
Used with
DumDum.create([config])
{
locale: "fr" | "en"; // Default to "en".
}
maxLength
: Integer between 13 and 620.type
: String. Default to"plain"
.
interval
:[minLength, maxLength]
minLength
: Integer between 12 and 619.maxLength
: Integer between 13 and 620.
type
: String. Default to"plain"
.
yarn
- All Tests:
yarn test
- Lint Tests:
yarn test:lint
- Unit Tests:
yarn test:unit
- Unit Tests (watch):
yarn test:watch
yarn data:generate [fr|en]...