JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q41336F
  • License MIT

Easily get static quotes from Goodreads

Package Exports

  • quotes-goodreads

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (quotes-goodreads) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

quotes-goodreads

Easily get access to Goodreads quotes. This is a static list, and doesn't make connection to the Goodreads website.

The Quotes Goodreads library exported as Node.js modules. npm version

Installing

Using npm:

$ npm i --save quotes-goodreads

Usage

In Node.js:

// Load the module
const quotes = require('quotes-goodreads');

// Get a random Goodreads quote
console.log(quotes.getRandomStringQuote());

API

quotes.getRandomStringQuote()

Example: quotes.getRandomStringQuote();

Returns a random quote as String.

quotes.getRandomStringQuoteWithAuthor()

Example: quotes.getRandomStringQuoteWithAuthor();

Returns a random quote as string, with author's name also added.

quotes.getMostPopularQuotesString([number])

Example: quotes.getMostPopularQuotesString(2);

Gets the most popular quote, by rank. Ranking starts at 1. If no number is given, it responds with most popular quote.

quotes.getMostPopularQuotesStringWithAuthor([number])

Example: quotes.getMostPopularQuotesStringWithAuthor(2);

Same as getMostPopularQuotesString([number]), but author's name is also added.

quotes.quotesByAuthor(string)

Example: quotes.quotesByAuthor('Dr. Seuss');

Returns an array of quotes in string by the author. Substring of author's name also work.

Built With

  • lodash - A modern JavaScript utility library delivering modularity, performance & extras.
  • Dataset generated by going through Goodreads top quotes (total top 2997 quotes).

Authors

Written by sumanto