1.2.3 • Published 2 years ago

rolldicejs v1.2.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

JavaScript Dice Roller

Slim and simple dice roller

Install

Install with npm

$ npm install rolldicejs

Install with yarn

$ yarn add rolldicejs

Start using in your app

// ESM
import Dice from 'rolldicejs';

// CommonJs
const Dice = require('rolldicejs').default;

Docs

Dice.roll(dnd: string) -> number
Dice.roll(dnd: string, details: boolean) -> number[]
Dice.roll(numOfSides: number) -> number
Dice.roll(count: number, numOfSides: number) -> number
Dice.roll(count: number, numOfSides: number, details: boolean) -> number[]

Usage

Dice.roll("2d6") -> 5
Dice.roll("2d6", true) -> [3, 2]
Dice.roll(20) -> 14
Dice.roll(2, 6) -> 7
Dice.roll(4, 6, true) -> [6, 2, 4, 2]
1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago