Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pick-random-cli

sindresorhus705MIT2.0.0

Pick random items from a list

cli-app, cli, pick, choose, random, rand, list, raffle, item, element, decision, winner, picking, picker, choosing

readme

pick-random-cli

Pick random items from a list

Useful for making decisions, picking a winner, or anything else randomness can help you with.

Install

$ npm install --global pick-random-cli

Usage

$ pick-random --help

  Usage
    $ pick-random <item> … [--count=<number>]
    $ cat newline-separated-picks.txt | pick-random

  Examples
    $ pick-random unicorn rainbow cake pony --count=2
    pony
    rainbow

    $ pick-random yes no
    $ pick-random $(seq 54) --count=6