Skip to main content
Version: v0.0.6

Function: email()

email(rng, person?): string

A synthetic email at an RFC 2606 / 6761 reserved domain - <slug>@example.com.

Parameters

rng

Rng

The seeded generator.

person?

SyntheticName

Optional name to derive the local-part slug from; otherwise a random slug is used.

Returns

string

A synthetic email address.

Example

import { createRng, email, name } from "@cosyte/synth";
email(createRng(1), name(createRng(1))); // "<given>.<family>@example.com"