bowling-score-lib
v0.0.2
Published
Ten-Pin Bowling Score Calculator
Readme
bowling-score-lib
Ten-Pin Bowling Score Calculator
Usage
$ npm install -g bowling-score-lib
$ bowling-score-lib COMMAND
running command...
$ bowling-score-lib (--version)
bowling-score-lib/0.0.2 darwin-arm64 node-v22.12.0
$ bowling-score-lib --help [COMMAND]
USAGE
$ bowling-score-lib COMMAND
...Commands
bowling-score-lib score SEQUENCE
calculate the score of a bowling game
USAGE
$ bowling-score-lib score SEQUENCE [-j] [-r]
ARGUMENTS
SEQUENCE - sequence of throws where X is a strike, / is a spare and 0-9 are the number of pins knocked down
FLAGS
-j, --json Outputs the score as a json object with the score key set as "score".
If this option is not passed, then score is printed to stdout.
-r, --rounds Add rounds to the output - it only works with the json flag.
DESCRIPTION
calculate the score of a bowling game
EXAMPLES
$ bowling-score-lib score "12345123451234512345"
$ bowling-score-lib score "XXXXXXXXXXXX" --json
$ bowling-score-lib score "X9-9-9-9-9-9-9-9-9-" --json --roundsSee code: src/commands/score.ts
Develpment
Run on terminal the ./.bin/dev.js in order to test locally, example:
./bin/dev.js score "X9-9-9-9-9-9-9-9-9-" --json --rounds