0.2.2 • Published 11 months ago

miniroll v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

miniroll

A simple JS library for rolling dice

Installation

npm i miniroll
yarn add miniroll

Usage

const { roll, describe, describeShort } = require('miniroll')

const dice = '4d6dL'

describe(dice)
// 'roll 4 6-sided dice and drop the lowest'

describeShort(dice)
// '4d6dL'

roll(dice)
/*
  {
    result: 14,
    rolls: [ 5, 6, 3 ],
    dropped: [ 3 ],
    source: '4d6dL',
    rollData: {
      count: 4,
      sides: 6,
      select: { mode: 'drop', end: 'lowest', count: 1 }
    }
  }
*/
0.2.1

11 months ago

0.2.0

11 months ago

0.2.2

11 months ago

0.1.2

1 year ago

0.1.3

1 year ago

0.1.1

2 years ago

0.1.0

2 years ago