-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: Add documentation for the module in README.md
- Loading branch information
1 parent
eff7008
commit f8098b0
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,29 @@ | ||
# pic-word-gen | ||
A word generator module for using in a pictionary | ||
|
||
# Installation | ||
|
||
``` | ||
npm install pic-word-gen | ||
``` | ||
|
||
# Usage | ||
|
||
- To generate a word, require the module and call `generateWord` function | ||
- Pass in the level of difficulty of the words as a parameter to the `generateWord` function | ||
- Allowed levels are | ||
- easy | ||
- medium | ||
- hard | ||
- Default level is `easy` if no level is passed to the `generateWord` function | ||
``` | ||
const wordgen = require('pic-word-gen') | ||
let easyWord = wordgen.generateWord('easy') | ||
let mediumWord = wordgen.generateWord('medium') | ||
let hardWord = wordgen.generateWord('hard') | ||
``` |