Skip to content

boredx100/scrab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrab

A random word and sentence generation utility.

Usage:

npm install --save scrab
var scrab = require('scrab');

console.log('My favorite word of all time is "' + scrab.word() + '".');
// => My favorite word of all time is "aristocrat".

scrab.word({
    preposition: true
});
// => "off"
// => "down"

scrab.word({
    conjunction: true
});
// => "so"
// => "and"

// Capitalize the first letter of random words.
scrab.word({
    capitalize: true
});
// => "Arsenal"

// Get a bunch of random words.
scrab.words();
// => ["conveyable", "rattlings", "Marlowe", "indemnify"]

// Get totally random sentences.
scrab.sentence();
// => "Godliness outside excluding across; beyond before, among; beyond!"
// => "Evocation, shrillness; rioters, Katy honeycombs?"
// => "Krupp overclocking topdressings above."
// => "Unregulated installer thermoplastic wiggly lipreader?"

// Get sentences with specific criteria.
scrab.sentence({
    min: 2,
    max: 3,
    capitalize: true,
    punctuate: false
});
// => "Pitifullest Vaudevillians Hansom"

// SCREAM!!!
scrab.sentence({
    scream: true
});
// => FLATT WINTER AFTER SO!!!
// => EMBLEMATIC EXTERNALIZE TWISTY; POLYANDRY: TO OFF ABOARD!!!

About

A random word and sentence generation library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%