1.0.0-alpha.5 • Published 6 years ago
dumdum v1.0.0-alpha.5
dumdum
Dummy data generator for local development, demos and testing purposes.
Install
npm i -D dumdumExample
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);Roadmap
Generators
- HTML generator (
text()generator) - Markdown generator (
text()generator) - Number generator
Localization
- Chinese localization
- Japanese localization
- Portuguese localization
- Spanish localization
- Russian localization
Misc
- Questions support (
text()generator) - Increase maximum length to
1,000.
API
Options
Used with
DumDum.create([config])
{
locale: "fr" | "en"; // Default to "en".
}Methods
text(maxLength[, type])
maxLength: Integer between 13 and 620.type: String. Default to"plain".
text(interval[, type])
interval:[minLength, maxLength]minLength: Integer between 12 and 619.maxLength: Integer between 13 and 620.
type: String. Default to"plain".
Contribute
Get Started
yarnTest
- All Tests:
yarn test - Lint Tests:
yarn test:lint - Unit Tests:
yarn test:unit - Unit Tests (watch):
yarn test:watch
Generate Data
yarn data:generate [fr|en]...1.0.0-alpha.5
6 years ago
1.0.0-alpha.4
7 years ago
1.0.0-alpha.3
7 years ago
1.0.0-alpha.2
7 years ago
1.0.0-alpha.1
7 years ago
1.0.0-alpha.0
7 years ago
1.0.1
8 years ago
1.0.0
8 years ago