1.0.2 • Published 8 years ago

snicksnack v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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.

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago