dart_dice_parser 0.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 54

dart_dice_parser

A library for parsing dice notation

Usage

A simple usage example:

import 'package:dart_dice_parser/dart_dice_parser.dart';

main() {
  
  var diceParser = new DiceParser();
  
  var diceExpression = "2d6 + 1 + 3d10";
  
  print("$diceExpression : ${diceParser.roll(diceExpression)}");
}

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.2.0

  • upgrade to dart 2

0.1.2

  • move args to dev_dependency, since it's just for the example

0.1.1

  • added contributing/code-of-conduct docs

0.1.0

  • change DiceRoller to output information about individual rolls, instead of just returning the sum.

0.0.6

  • remove dependency on quiver, since not heavily using it

0.0.5

  • various fixes as I figure out what I'm doing with Dart
  • empty/null checking with quiver.strings

0.0.1

  • Initial version, created by Steve Christensen

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dart_dice_parser: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dart_dice_parser/dart_dice_parser.dart';
  
Version Uploaded Documentation Archive
0.2.0 Oct 3, 2018 Go to the documentation of dart_dice_parser 0.2.0 Download dart_dice_parser 0.2.0 archive
0.1.2 Dec 1, 2017 Go to the documentation of dart_dice_parser 0.1.2 Download dart_dice_parser 0.1.2 archive
0.1.1 Dec 1, 2017 Go to the documentation of dart_dice_parser 0.1.1 Download dart_dice_parser 0.1.1 archive
0.1.0 Dec 1, 2017 Go to the documentation of dart_dice_parser 0.1.0 Download dart_dice_parser 0.1.0 archive
0.0.6 Dec 1, 2017 Go to the documentation of dart_dice_parser 0.0.6 Download dart_dice_parser 0.0.6 archive
0.0.5 Nov 28, 2017 Go to the documentation of dart_dice_parser 0.0.5 Download dart_dice_parser 0.0.5 archive
0.0.4 Nov 28, 2017 Go to the documentation of dart_dice_parser 0.0.4 Download dart_dice_parser 0.0.4 archive
0.0.3 Nov 28, 2017 Go to the documentation of dart_dice_parser 0.0.3 Download dart_dice_parser 0.0.3 archive
0.0.2 Nov 28, 2017 Go to the documentation of dart_dice_parser 0.0.2 Download dart_dice_parser 0.0.2 archive
0.0.1 Nov 28, 2017 Go to the documentation of dart_dice_parser 0.0.1 Download dart_dice_parser 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
15
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
54
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:dart_dice_parser/dart_dice_parser.dart.

Health suggestions

Format lib/src/dice_parser.dart.

Run dartfmt to format lib/src/dice_parser.dart.

Format lib/src/dice_roller.dart.

Run dartfmt to format lib/src/dice_roller.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use dart_dice_parser.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
petitparser ^2.0.2 2.0.2
Dev dependencies
args ^1.5.0
mockito ^3.0.0
test ^1.3.4