Getting Started
Dunna generates random values for tests, seed data, and quick prototypes. The public API is a single object with grouped helpers.
Install
Use your preferred package manager:
bash
npm install dunnabash
pnpm add dunnabash
yarn add dunnabash
bun add dunnaImport
Dunna exposes a named export dunna (there is no default export).
ESM
ts
import { dunna } from 'dunna';CommonJS
ts
const { dunna } = require('dunna');Quick example
ts
import { dunna } from 'dunna';
dunna.basic.boolean();
dunna.basic.integer({ min: 1, max: 101 }); // integer in [1, 101)
dunna.person.name();
dunna.location.cityName();See the API overview for all modules and the module reference for detailed options.
Documentation site
This site is built with VitePress. From the repository root:
| Script | Description |
|---|---|
bun run docs:dev | Start the dev server |
bun run docs:build | Static build to docs/.vitepress/dist |
bun run docs:preview | Preview the production build |