@blwat/utils - v0.1.0-alpha.2
    Preparing search index...

    Class RandomNumberGeneratorFactory

    A static factory class for creating a SeededRandomNumberGenerator object.

    0.1.0

    Index

    Methods

    • Build a SeededRandomNumberGenerator object with the given seed and namespace from an asynchronous hashing algorithm.

      Parameters

      • seed: string

        The primary input to determine the random number sequence.

      • Optionalnamespace: string

        Namespace to create different sequences from the same seed.

      Returns Promise<SeededRandomNumberGenerator>

      This method relies on the Web Crypto API via crypto.subtle. In Node.js environments, ensure you are using a version where the Web Crypto API is available.

      • When the given seed is not a string.
      • When the given namespace is not a string.

      0.1.0