snicksnack

1.0.2 • Public • Published

snicksnack

Generates an array of random words or sentences choosen from word lists provided by the kelly-lists module. Random selection adheres to a zipfian distribution with the addition of not icluding a word more than once.

usage

const snicksnack = require(`snicksnack`)
 
const randomWords = snicksnack.words(2)
const randomSentences = snicksnack.sentences(3)

api

snicksnack([configuration])

Returns an instance of snicksnack with a custom configuration. configuration is an <Object> and has to contain the following keys:

{
  sentenceLength: {
    min: 7,
    max: 26
  },
  language: `swedish`
}

Available languages are: arabic, chinese, english, italian, norwegian, russian, swedish

snicksnack.words(count)

Returns an <Array> of count words.

snicksnack.sentences(count)

Returns an <Array> of count sentences.

snicksnack.defaults

<Object> - default configuration.

Readme

Keywords

Package Sidebar

Install

npm i snicksnack

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • rogerbf