rqg
v1.0.1
Published
Random quote generator
Downloads
1
Readme
random-quotes
Get random quotes.
Installation
$ npm install --save rqg
Usage
CommonJS:
const randomQuotes = require('rqg');
randomQuotes();
// {
// body: 'It\'s not poisonous...',
// author: 'Famous Last Words'
// }
API
randomQuotes([count=1])
count
: Number, Optional: The number of random quotes to get.- Returns a random quote object with the following keys:
author
,body
- When count is given, returns an array of random quotes.
randomQuotes.byAuthor(author)
author
: String. The name of the author.- Returns an array of quotes by the given author. Array will contain the string bodies of the quotes directly.
License
MIT License