Skip to content

A word generator module for using in a pictionary

License

Notifications You must be signed in to change notification settings

Room4O4/pic-word-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pic-word-gen

Version npm

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')