Skip to content

Commit

Permalink
doc: Add documentation for the module in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sampathBlam committed May 7, 2020
1 parent eff7008 commit f8098b0
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
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')
```

0 comments on commit f8098b0

Please sign in to comment.