
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Your friendly neighbourhood dice roller - for any RPG! Based on standard dice syntax. Supports standard rolls, keep highest/lowest, and modifiers.
This Dice Roller provides a comprehensive set of tools to simulate dice rolls as part of tabletop RPG games like Dungeons & Dragons. It includes functionality to roll any number of dice with any number of sides, apply modifiers, and optionally keep the highest or lowest rolls. It is based on, and uses the same syntax as the Avrae D20 module for Python.
This module is easy to install via npm:
npm install js-d20
To use this library, first import the functions you need from the package:
const { roll } = require('js-d20');
Then, you can use the roll function to execute dice rolls:
let result = roll("2d10+5");
console.log(result.toString()); // Outputs: 2d20 (4, 8) +5 = `17`
console.log(result.total()); // Outputs: 17
Or
roll("d20-2"); // Outputs: Result: d20 (16) -2 = `14`
1d20 - Rolls one 20-sided die.4d6 - Rolls four 6-sided dice.2d10+5 - Rolls two 10-sided dice and adds 5 to the total.2d8-3 - Rolls two 8-sided dice and subtracts 3 from the total.4d6kh3 - Rolls four 6-sided dice and keeps the highest three rolls.5d20kl3 - Rolls five 20-sided dice and keeps the lowest three rolls.3d6kh2+4 - Rolls three 6-sided dice, keeps the highest two rolls, and adds 4 to the total.This project is licensed under MIT License.
FAQs
Your friendly neighbourhood dice roller - for any RPG! Based on standard dice syntax. Supports standard rolls, keep highest/lowest, and modifiers.
We found that js-d20 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.