Documentation
    Preparing search index...
    • Generates a random name-like string with realistic length variation.

      Creates a name by generating a paragraph with 2-3 words (randomly chosen). The resulting string resembles typical human names in structure and length. Each word is between 3-7 characters by default, creating realistic-looking names.

      Processing cost: The delegated paragraph work scales with the requested word count and total generated characters.

      Parameters

      • length: number = ...

        Number of words in the name (default: random between 2-3)

      Returns string

      A space-separated string of random words (each 3-7 chars by default)

      RandomGenerator.name(); // e.g. "lorem ipsum" (2-3 words)
      RandomGenerator.name(1); // e.g. "dolor" (single word)
      RandomGenerator.name(3); // e.g. "sit amet consectetur" (3 words)

      // Generate test user names
      const users = Array.from({ length: 10 }, () => ({
      id: RandomGenerator.alphaNumeric(8),
      name: RandomGenerator.name(),
      email: `${RandomGenerator.name(1)}@test.com`,
      }));

      // Create random author names for blog posts
      const authorName = RandomGenerator.name();

      contracts/common.md#principled-implementation A name is a short paragraph of two or three lowercase words by default, so it reads as a person or entity name without an external name list.

      contracts/common.md#clear-and-simple-design A one-line delegation to paragraph with the sentence count as the word count.

      contracts/common.md#prohibited-implementation-shortcuts The words are drawn letters, not a fixed list of names.

      contracts/common.md#meaningful-documentation The comment states the default length and gives examples.