pickSome

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.array

This returns you one or more random item of the passed array

Params

  1. array*-Any[]

    The array in which you want to pick a random item

  2. $min1Number

    The minimum number of items to pick

  3. $maxnullNumber

    The maximum number of items to pick

Return

  1. -Any

    The random array item(s)

Example

import { pickSome } from '@blackbyte/sugar/array':
pickSome(['hello','world','test'], 1, 2);