Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
/ dumdum Public archive

Dummy data generator for local development, demos and testing purposes.

License

Notifications You must be signed in to change notification settings

ivangabriele/dumdum

Repository files navigation

dumdum

License NPM Package Build Status Code Coverage

Dummy data generator for local development, demos and testing purposes.

Install

npm i -D dumdum

Example

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

yarn

Test

  • 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]...

About

Dummy data generator for local development, demos and testing purposes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •