Skip to content

Commit

Permalink
Merge 0fce48c into 23cc5e5
Browse files Browse the repository at this point in the history
  • Loading branch information
ForrestWeiswolf committed Feb 10, 2019
2 parents 23cc5e5 + 0fce48c commit 3b46f44
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: node_js
node_js:
- "stable"
cache:
directories:
- "node_modules"

jobs:
include:
- stage: Produce Coverage
node_js: node

script: npx istanbul cover jasmine --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
Meristem
======
[![npm version](http://img.shields.io/npm/v/meristem.svg?style=flat)](https://npmjs.org/package/meristem "View this project on npm")
[![Status](https://travis-ci.org/ForrestWeiswolf/meristem.svg?branch=master)](https://travis-ci.org/ForrestWeiswolf/Meristem)
[![Coverage Status](https://coveralls.io/repos/github/ForrestWeiswolf/Meristem/badge.svg?branch=continuous-integration)](https://coveralls.io/github/ForrestWeiswolf/Meristem?branch=continuous-integration)
[![Known Vulnerabilities](https://snyk.io/test/github/ForrestWeiswolf/Meristem/badge.svg?targetFile=package.json)](https://snyk.io/test/github/ForrestWeiswolf/Meristem?targetFile=package.json)

A lightweight (no dependencies!) Javascript library for procedural text generation using a context-free grammar.
Several examples of usage can be found [here](https://github.com/ForrestWeiswolf/Meristem-examples)

[Documentation](https://forrestweiswolf.github.io/Meristem/)

[Changelog](https://github.com/ForrestWeiswolf/Meristem/blob/master/CHANGELOG.md)

(I apologize for any unconventional terminology - what I'm trying to do here is close enough to the normal uses of context-free grammars that I feel I ought to follow convention, but not so similar that I'm easily able to do so without potentially misleading)
Expand Down
2 changes: 1 addition & 1 deletion WeightedRandom.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const mustBeArr = (val, message) => mustBeClass(val, Array, message)
* A set of values with weights, which can return a random value
* with probability corresponding to its weight.
* @constructor
* @param {...Array} options Any number of rrays of length 2,
* @param {...Array} options Any number of arrays of length 2,
* each consisting of an arbitrary value and the weight assigned to it.
* Alternatively, the constructor may be called with a single object
* where the keys are options and the assosciated values are their weights.
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
},
"license": "ISC",
"devDependencies": {
"jasmine": "^2.8.0",
"coveralls": "^3.0.2",
"istanbul": "^1.1.0-alpha.1",
"jasmine": "^2.99.0",
"jsdoc": "~3.5.5",
"webpack": "^3.8.1"
"webpack": "^3.12.0"
}
}
2 changes: 1 addition & 1 deletion spec/FormatSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe('Format', () => {
}
}

expect(count).toBeCloseTo(3000, -2)
expect(count).toBeCloseTo(3000, -3)
})

it('handles nonterminals inside inline optionals', () => {
Expand Down

0 comments on commit 3b46f44

Please sign in to comment.