# js-dice-codes

> A JS library for parsing dice codes and executing them

Latest version **0.1.3** (published 2019-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install js-dice-codes
pnpm add js-dice-codes
yarn add js-dice-codes
bun add js-dice-codes
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-04-08 |
| First published | 2019-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Colin Howe |
| Maintainers | colinhowe |
| Keywords | dice, codes, js |

## Links

- npm: https://www.npmjs.com/package/js-dice-codes
- Repository: https://github.com/colinhowe/js-dice-codes
- Homepage: https://github.com/colinhowe/js-dice-codes#readme
- Issues: https://github.com/colinhowe/js-dice-codes/issues
- npm.io page: https://npm.io/package/js-dice-codes

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.3 (latest) — 2019-04-08
- 0.1.2 — 2019-04-07

## README

# js-dice-codes [![CircleCI](https://circleci.com/gh/colinhowe/js-dice-codes.svg?style=svg)](https://circleci.com/gh/colinhowe/js-dice-codes) [![codecov](https://codecov.io/gh/colinhowe/js-dice-codes/branch/master/graph/badge.svg)](https://codecov.io/gh/colinhowe/js-dice-codes)

# Overview

A dice code parser and roller. Takes dice codes of the form `1d6 + 1d8 + 4` and
outputs the result as well as the roll of each dice.

# Usage

```
> npm i --save js-dice-codes
> import roll from 'js-dice-codes';
> roll('10d6')
{ result: 33, breakdown: [ 3, 4, 6, 1, 2, 4, 5, 4, 1, 3 ] }
```

---
_Source: https://npm.io/package/js-dice-codes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
