rwg
Random Word Generator
Dependencies
- Node.js (Tested with 8.3.0+)
Usage
NOTE:
In the project's current state, the way words are loaded can cause a race condition. There is an exposed isReady()
method
which returns a boolean stating if the object is loaded or not. In a future version I might expose an onReady()
method or some sort
of ready callback.
const RWG = ; // Constructor with no limit on wordsconst rwg1 = ; rwg1; // Constructor with min/max constraintsconst rwg2 = min: 3 max: 10 ; rwg2;
Constructor Options:
- min (Integer): Minimum word length
- max (Integer): Maxmimum word length