@lucadv/pickme

1.1.0 • Public • Published

Overview

A module that, given a list of elements, randomly pick up one and return it. The list must contain elements of type number, string or boolean. It can contain duplicated elements and elements of different types.

Usage

const Pickme = require('@lucadv/pickme');
const picked = new Pickme(['a', 'b', 'c']).pickOne(); // will be one of a, b or c

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i @lucadv/pickme

    Weekly Downloads

    0

    Version

    1.1.0

    License

    ISC

    Unpacked Size

    6.57 kB

    Total Files

    9

    Last publish

    Collaborators

    • lucadv