get-random-quotes

1.1.0 • Public • Published

This package can generate upto a thousand quotes for you on one call.

Installation

npm i get-random-quotes

How to use.

let {getSingleQuote, getTenQuotes, getHundredQuotes, getThousandQuotes} = require("get-random-quotes");

// To get one random quote you do:

let singleQuote = getSingleQuote;

This returns an array which you can loop through, example:

singleQuote.forEach(quoteObj => {

//you can get the quote object like so

console.log(quoteObj) //  { quote: "You can't always get what you want, but if you try sometimes, you might find, you get what you need.,
author: 'Mick Jagger' }

});

// To get ten random Quote you simply call the:

"getTenQuotes" // Returns an array like the getSingleQuote.

// To get hundred random quotes you simply call the:

"getHundredQuotes" // Returns an array like the getSingleQuote.

// To get thousand random quotes you simply call the:

"getThousandQuotes" // Returns an array like the getSingleQuote.

Package Sidebar

Install

npm i get-random-quotes

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

701 kB

Total Files

4

Last publish

Collaborators

  • willydbd