Nebulous Puffy Marshmallows
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    rollinpublic

    rollin (urban assault vehicle, natch)

    A little library for doing dice rolls.

    Install

    npm install rollin
    

    Usage:

    From inside node:

    const roll = require('rollin');
     
    console.log(roll('3d6'));
    console.log(roll('d8'));
    console.log(roll('12d4+2'));
    console.log(roll('d100+12'))

    From the cli:

    josh@pidgey:~$ roll 3d6+2
    9

    Commands are of the form {number_of_dice}d{sides_of_die}[+/-{some_modifier}]. Spaces are stripped, otherwise the DSL is pretty limited.

    Tests:

    npm test
    

    Keywords

    none

    install

    npm i rollin

    Downloadsweekly downloads

    2

    version

    1.0.0

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar
    • avatar