rand-quote
v1.0.3
Published
Get a random quote provide by https://favqs.com
Downloads
7
Readme
rand-quote
Get a random quote provide by https://favqs.com
Install
$ npm install rand-quote
Usage
const randomQuote = require('rand-quote')
randomQuote().then((quote) => console.log(quote))
//=> "The great fun in my life has been getting up every morning and rushing to the typewriter because some new idea has hit me." -Ray Bradbury
Methods
randomQuote([config])
randomQuote().then((quote) => console.log(quote))
//=> "The great fun in my life has been getting up every morning and rushing to the typewriter because some new idea has hit me." -Ray Bradbury
randomQuote({
quoteIt: true,
body: true,
author: false
}).then((quote) => console.log(quote))
//=> "The great fun in my life has been getting up every morning and rushing to the typewriter because some new idea has hit me."
Config
These are the available config options. No one is required. Everything is set to true
by default.
{
// Set to 'true', if you want to have '"quote"' or false will give you 'quote'
quoteIt: true, // default
// Set to 'true', if you want to have the body of the quote
body: true, // default
// Set to 'true', if you want to have the author name of the quote
author: true // default
}
Test
$ git clone https://github.com/Maxime6678/rand-quote
$ npm install
$ node exemple/simple.js