JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30
  • Score
    100M100P100Q49038F
  • License MIT

A package to roll dice like 〇d△ / 〇d△などのダイスを振れるパッケージ

Package Exports

  • trpg-dice-roller
  • trpg-dice-roller/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (trpg-dice-roller) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TRPG Dice Roller

How to use / 使い方

import { roll } from "trpg-dice-roller";
const result = rollDice("2d6 + 1d8 - 3");
console.log(result);
/*
{
    "dice": "2d6 + 1d8 - 3",
    "formula": "5 + 1 - 3 = 3",
    "result": 3,
    "output": "2d6 + 1d8 - 3 → (1 + 4) + (1) - 3 = 3",
    "output_short": "2d6 + 1d8 - 3 → (5) + (1) - 3 = 3"
}
*/