From f8098b04940a053877f018ab80abc70909f5bdce Mon Sep 17 00:00:00 2001 From: Sampath Kumar Krishnan Date: Thu, 7 May 2020 22:37:28 +0530 Subject: [PATCH] doc: Add documentation for the module in README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index bbafe37..79464f3 100644 --- a/README.md +++ b/README.md @@ -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') + +``` \ No newline at end of file