Have ideas to improve npm?Join in the discussion! »

    pengrape

    1.0.2 • Public • Published

    pengrape

    A collection of utilities generating anything random.

    Installation

    $ npm install pengrape

    Usage

    const random = require("pengrape");

    Number

    const number = random.number({ min: 0, max: 20 });
    console.log(number); // 12

    Color

    const color = random.color({ format: "HEX" });
    console.log(color); // #f28e51

    Password

    const password = random.password({ symbol: false });
    console.log(password); // W7q0Va5RY53L63o7U0it

    Spinner

    const spinner = random.spinner({ entries: ["Pizza", "Lasagna", "Quesadilla"] });
    console.log(spinner); // { entry: 'Lasagna', min: 120, max: 240, deg: 204, data: 120, isWinner: true }

    Dice

    const dice = random.dice({ notation: "2d10" });
    console.log(dice); // { results: [ 4, 9 ], total: 13 }

    Text

    const text = random.text({ type: "word" });
    console.log(text); // inwitada

    See the full docs for details and examples.

    Issues

    If any issues are found, they can be reported here.

    License

    This project is licensed under the MIT license.

    Install

    npm i pengrape

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    14.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar