Function getRandomWords

  • Gets an array of random words from a dictionary

    Usually 2048 words are sufficient. This method does not support dictionaries with more than 65536 words

    Parameters

    • count: number

      The number of words generated

    • dictionary: string[]

      An array of strings from where the random words are picked

    Returns string[]

    An array with count words

    An error if dictionary's length is smaller than count