Function weighted

  • This function takes an array of objects with a commonality property and returns a random result, weighted by the commonality property.

    Parameters

    • items: any[]

      An array of objects with a commonality property

    Returns any

    • A random object from the array, weighted by the commonality property

Generated using TypeDoc